Adding Logic to an Existing Formula

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
I would appreciate some assistance.
I cannot get the desired results when I try to add to an existing, working, formula

The formula below works perfectly, but, I would like to add another condition to it.
=IF(ISERROR(VLOOKUP(O161,'G-Block CMO-FMO and IP Ranges '!$A$61:$G$400,2,FALSE)),"",VLOOKUP(O161,'G-Block CMO-FMO and IP Ranges '!$A$61:$G$400,2,FALSE))
This formula is located in cell P161
I want to add another condition to it.

Below is the logic that I need to add to the existing formula.
If D161 is populated, then populate P161 with the contents of D161
If D161 is blank, then populate P161 using the formula above (which works correctly)
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
in P161
=IF(D161<>"",D161,IF(ISERROR(VLOOKUP(O161,'G-Block CMO-FMO and IP Ranges '!$A$61:$G$400,2,FALSE)),"",VLOOKUP(O161,'G-Block CMO-FMO and IP Ranges '!$A$61:$G$400,2,FALSE)))
 
Upvote 0
Try:
Code:
=IF(D161="",[COLOR=#333333]IF(ISERROR(VLOOKUP(O161,'G-Block CMO-FMO and IP Ranges '!$A$61:$G$400,2,FALSE)),"",VLOOKUP(O161,'G-Block CMO-FMO and IP Ranges '!$A$61:$G$400,2,FALSE)),D161)

[/COLOR]
 
Upvote 0
wow.......thank you both. Now that I see it, I should have been able to figure it out. Thanks so much
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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