At every change in cell value

Closed
wgpizza - Jan 6, 2011 at 08:02 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jan 7, 2011 at 09:04 AM
Hello,

I have a column where the cell value ("RF001" for instance) repeats several times before changing to the next value ("RF002"). The number of time the value repeats varies. "RF001" may repeat 3 times, "RF002" 5 times. I have a second column with numbers (lets say 5,15,3). I want to use a formula to tell Excel to put a "5" in a cell next to each "RF001" and then put a "15" next to each "RF002", etc., using the next number from column 2 each time the value in column 1 changes.

Can anyone tell me how to do this?

Many Thanks...

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Jan 7, 2011 at 09:04 AM
Hi wgpizza,

Try this:
=IF(A1="RF001",5,IF(A1="RF002",15,IF(A1="RF003",3,IF(A1="RF004",.........

Note that you can only nest 7 IF's.

Will this do or do you need another solution?

Best regards,
Trowa
0