user2837101
user2837101

Reputation: 1

IF formula - EXCEL - obtain data from another cell

I am calculating the approximate cost per journey of our metro and country customers.

I need to know how to get cells H4:H42 to obtain the data from cell D43 which says "Metro driving" if the value is 1 OR the data from D45 which says "Country driving" if the value is 2.

Hope this makes sense.

Thanks in advance.

Upvotes: 0

Views: 153

Answers (2)

user2137354
user2137354

Reputation:

You could try a simple find and replace or the following formula:

=CHOOSE($H4,$D$43,$D$45)

This gets the value in H and assigns D43 for 1, D45 for 2, and so on if you were to add more values for 3+.

Upvotes: 0

Sathish Kothandam
Sathish Kothandam

Reputation: 1520

Are u lookin below one ?(place this formula in D4 cell)

Assuming that D43 = "Metro driving", and D45 = "Country driving", you could use the following:

=IF(H4=1,$D$43,IF(H4=2,$D$45,"Nothing Matched"))

Upvotes: 1

Related Questions