Finding Adjacent empty cell

S

s1ip

lets say you have 1 column (A) of data and it goes to row 5, You inser
a new Column A and shift everything to the right. So now you have
blank Column A and a Column B that has 5 rows of data.

How do I find the cell in Column A that would match the last row o
data in Column B which would be 5, So that i can fill Column A wit
data

I was thinking i can find the last cell of data in Column B. could
than move the cell selector over to the left by 1 and fill up? And i
so how do i do that?

Thanks in advance. I hope it is clear

Oh i'm using Excel Xp

Thanks
Keit
 
O

Otto Moehrbach

You would need VBA for that. I don't know what kind of "fill up" you want
to do, but the following code will find the cell in Column A that is in the
same row as the last entry in Column B. In this code I use the variable
LastCellColA to be that cell. If you want to use this code and more to do
the fill up part, post back with clarification of "fill up". HTH Otto
Sub FindCellColA()
Dim LastCellColA As Range
Set LastCellColA = Range("B" & Rows.Count).End(xlUp).Offset(, -1)
End Sub
 
Top