View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
marthasanchez marthasanchez is offline
external usenet poster
 
Posts: 15
Default Excel Functions for Records

I have a spreadsheet that has a different number of rows every week. Based on
the number of rows, I would like excel to perform functions such as Vlookup
and Days 360, in the empty columns. How do I get the functions to appear only
when there are records in the corresponding columns? Here is what I have. Not
sure where I should insert where to put my formulas and how ?


Worksheets("ARO").Unprotect

With Sheets("ARO")
Range("B8").CopyFromRecordset RST
End With
DoEvents

RST.Close

Worksheets("ARO").Protect
DoEvents

Worksheets("ARO").Unprotect
Sheets("ARO").Select
Cells(2, 1).Value = "Report has been succesfully updated"
DoEvents
Cells(2, 1).Font.ColorIndex = 1
DoEvents
Cells(2, 1).Font.Bold = True
DoEvents
Worksheets("ARO").Protect

Exit Sub