Finding NExt Blank Cell in Range
What triggers the macro, entring a value in G22?
If so the right click on the sheet tab of the menu sheet and select view
code. Paste in code like this:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rng As Range
If Target.Address = "$G$22" Then
Set rng = Worksheets("Sheet2").Range("B2:Z2")
For Each cell In rng
If IsEmpty(cell) Then
cell.Value = Target.Value
Exit For
End If
Next
End If
End Sub
--
Regards,
Tom Ogilvy
"Nigel Bennett" wrote in message
...
I received an answer to my last question and I have to say
first off, I am alway aprreciative of everybody who takes
the time to answer and I respect and admire your
programming skills.
My problem this time is as follows
I want to check a range (b2 to Z2) and I want to find the
first blank cell, once that cell is found I want it to
check a cell from the menu sheet and if there is something
in the cell insert it in the first blank cell
ie I enter YR 2005 in cell G22 on the menu sheet, then
when I look at sheet 2 it checks the range and when it
comes across the first blank cell it inserts that value
Thanks
Nigel
|