Excel 2007 VBA If then offset

Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
I have a sheet where the rows size varies and I am looking for code to lookup column F starting in row 3 to the bottom and if the cell has a "Q" then enter "QUOTE" in column AF in the same row.

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Why not write a formula in AF

=IF(F3<> "Q", "", "Quote") and drag this formula down
Posts
11
Registration date
Monday May 10, 2010
Status
Member
Last seen
December 9, 2011

Because AF contains data but blank if F = "Q" and it is part of a sheet set up macro so I need to find all the Q's in column F (dynamic range) and enter "QUOTE" in column AF
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Is it manually entered value in AF ? or is it a formula . If it is a formula then you can use

=IF(F3 ="Q", "Quote", << you old formula here>>)