# Thread: Adding Logic to an Existing Formula Thanks: 0 Likes: 0

1. ## Adding Logic to an Existing Formula

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)  Reply With Quote

2. ## Re: Adding Logic to an Existing 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)))  Reply With Quote

3. ## Re: Adding Logic to an Existing Formula

Try:
Code:
```=IF(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)),D161)

```  Reply With Quote

4. ## Re: Adding Logic to an Existing Formula

wow.......thank you both. Now that I see it, I should have been able to figure it out. Thanks so much  Reply With Quote

## User Tag List

#### Tags for this Thread

add, d161, existing, formula, p161 #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•