LOOKUP formula combined with an IF Formula

Detectiveclem

Active Member
Joined
May 31, 2014
Messages
320
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Hi can anyone help. I am currently using the following formula to sum to two based on another cell having data (i.e. not blank)

=IF(O20="","",Q19+P20)

This works perfectly well so long as Q19 has data, however this is not always the case and therefore I would prefer to use the LOOKUP formula so that if O20 has data the calculation will be based upon the last no blank cell in Q which then would work.

I have played around with the formula

=LOOKUP(9.99E+307,Q6:Q19) by try to include it with the =IF formula but have been unsuccessful. I would really appreciate some help here.

Thank you
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Sorry my last post wasn’t very clear……let me try again

Hi can anyone help. I am currently using the following formula to sum to cells two based on another cell having data (i.e. not blank)

=IF(O20="","",Q19+P20)

This works perfectly well so long as Q19 has data, however this is not always the case and therefore I would prefer to use the LOOKUP formula so that if O20 has data the calculation will be based upon the last non blank cell in Q which then would work.

I have played around with the formula

=LOOKUP(9.99E+307,Q6:Q19) by trying to include the =IF formula but have been unsuccessful. I would really appreciate some help here.

Thank you
 
Upvote 0
Peter you have come to my rescue once again. I play around with it for ages without success. Thank you once again, it's all working perfectly now. Have a great weekend. Paul
 
Upvote 0
Peter you have come to my rescue once again. I play around with it for ages without success. Thank you once again, it's all working perfectly now. Have a great weekend. Paul
Cheers. Glad it worked for you. :)
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

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