Seamus2626
asked on
Drop in and fill formula
Hi,
I have two pieces of formula that need to dropped into cells N2, O2 and filled down to how many rows our present in the sheet (count determined by Col A)
So if there are 2500 rows of data, the formula needs to fill (N2:O2500)
The formula in N =VLOOKUP(K2,LOOKUP,7,0)
The formula in O =VLOOKUP(K2,LOOKUP,4,0)
Many thanks
Seamus
I have two pieces of formula that need to dropped into cells N2, O2 and filled down to how many rows our present in the sheet (count determined by Col A)
So if there are 2500 rows of data, the formula needs to fill (N2:O2500)
The formula in N =VLOOKUP(K2,LOOKUP,7,0)
The formula in O =VLOOKUP(K2,LOOKUP,4,0)
Many thanks
Seamus
and what's the problem?
ASKER
Hi Phillip,
I need vb code to auto fill "N" & "O" formula based on the count of rows in Column A
Thanks
I need vb code to auto fill "N" & "O" formula based on the count of rows in Column A
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
With Sheets("Data")
R = .Range("A" & Rows.Count).End(xlUp).Row
.Range("N1").Value = "KAM FLAG"
.Range("O1").Value = "KAM GAM FLAG"
.Range("N2").Formula = "=VLOOKUP(K2,LOOKUP,7,0)"
.Range("O2").Formula = "=VLOOKUP(K2,LOOKUP,4,0)"
.Range("N2:O2").Copy .Range("N2:O" & R)
End With
that's what I needed Phillip!
R = .Range("A" & Rows.Count).End(xlUp).Row
.Range("N1").Value = "KAM FLAG"
.Range("O1").Value = "KAM GAM FLAG"
.Range("N2").Formula = "=VLOOKUP(K2,LOOKUP,7,0)"
.Range("O2").Formula = "=VLOOKUP(K2,LOOKUP,4,0)"
.Range("N2:O2").Copy .Range("N2:O" & R)
End With
that's what I needed Phillip!