At every change in cell value

Closed
Report
-
Posts
2829
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 22, 2021
-
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 reply

Posts
2829
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 22, 2021
490
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