Lookup or reference?

Closed
rebs - Oct 8, 2008 at 03:55 PM
 Shandor - Oct 9, 2008 at 11:48 AM
Hello,
I can't seem to figure out how to do the following
I need to enter a value four columns away from a name but want don't want to do it manually - in column b name is los angeles and i want for everytime "los angeles" appears, four columns away "98" shows up throughout my worksheet. can you help me write a macro for this?
rebs

2 responses

Ivan-hoe Posts 433 Registration date Saturday February 16, 2008 Status Member Last seen October 17, 2008 110
Oct 9, 2008 at 01:34 AM
Hello rebs,
instead of a macro, you could write a formula in column F
=IF(B1="los angeles";98;"")
Ivan
0
thanks, that much i can do. it's how to get "98" to fill in at b5, b33, b600, b750, b2000, etc. basically, every time "los angeles" is encountered in column b, i need "98" to fill in column g in the same row. i can't seem to get it to work.
rebs
0
I think Ivanhoe was suggesting that you copy and paste that formula into ALL of the rows of the column that you want the 98 to appear.

if there are other numbers for other cities, you may want to look into the LOOKUP or MATCH functions
0