An easier lookup formula ?

johnny52

Active Member
Joined
Oct 13, 2006
Messages
332
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
I have four columns and five rows.....I have a formula that works, but there must be an easier way

this is what I'm using,maybe it can be condensed. I might want to expand the formula to accommodate more columns, but for now

=IF(M4=N4,O4+P4,IF(M4=N5,O4+P5,IF(M4=N6,O4+P6,IF(M4=N7,O4+P7,IF(M4=N8,O4+P8,"")))))

Thanks for help
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try this

=IFERROR(O4+INDEX(P4:P8,MATCH(M4,N4:N8,0),1),"")

Expand P4:P8 N4:N8 ranges as required
 
Last edited:
Upvote 0
Don't understand what you mean by
"I might want to expand the formula to accommodate more columns,.."

Your formula above can be simplified to
=IFERROR(O4+INDEX(P4:P8,MATCH(M4,N4:N8,0)),"")

M.
 
Upvote 0
Worked great (both responses)

much appreciated!

Thanks
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,938
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top