# If Function - 4 results needed

#### TrishaL

##### Board Regular
Hi

Needing help with this. What i have is not working, obviously. Below are 4 scenarios and I need results for all 4.
I have this =IF(ISNUMBER(SEARCH("*",AN32)),IF(AO32>0,"Yes","Pending"),"") from my spreadsheet but I don't know how to change it for what i now need below. What i have below in the "D (Results)" column is the answer i want the formula to give me.
Any help would be appreciated.
Thanks
 A B C D (RESULTS) 1 38290-IOS-PC9540 30-Aug-18 TRUE Yes 2 38290-IOS-PC9541 30-Aug-18 FALSE Pending 3 38290-IOS-PC9542 FALSE Pending 4 "empty cell" "empty cell" FALSE No or leave empty

<tbody>
</tbody>

<colgroup><col><col span="4"></colgroup><tbody></tbody>

<colgroup><col><col span="4"></colgroup><tbody>
</tbody><colgroup><col><col span="4"></colgroup><tbody>
</tbody>

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Why this ISNUMBER SEARCH why not just check for AN32<>""

Why is your formula referring to cells AN32 and AO32 when your range is in A:C?

=IF(C2,"Yes",IF(COUNTA(A2:B2),"Pending","No"))

Excel 2010
ABCD
1ABCD (RESULTS)
238290-IOS-PC954030-Aug-18TRUEYes
338290-IOS-PC954130-Aug-18FALSEPending
438290-IOS-PC9542FALSEPending
5FALSENo
Sheet1
Cell Formulas
RangeFormula
D2=IF(C2,"Yes",IF(COUNTA(A2:B2),"Pending","No"))
D3=IF(C3,"Yes",IF(COUNTA(A3:B3),"Pending","No"))
D4=IF(C4,"Yes",IF(COUNTA(A4:B4),"Pending","No"))
D5=IF(C5,"Yes",IF(COUNTA(A5:B5),"Pending","No"))

Last edited:
Can you supply more info as to your rules for each scenario and how you arrive at the result

I copied the formula from my spreadsheet -- those are the columns/rows my data is actually in. sorry about that.

Column
A - needs data
B - needs a date
C - will be True or False
D - If A and B have data and C is True, then return "Yes". If A and B have data and C is False, then return "Pending". If A has data but B is empty and C is False then return "Pending". The last scenario is A is empty, B is empty and C is False, then return "No" or just return blank cell.
Thanks

I have tried what you provided but this won't exactly work as my columns aren't actually next to each other.
A is actually on AT
B is actually on AZ
C is actually on BI

Thanks,

It should, just adjust the ranges:

=IF(BI2,"Yes",IF(COUNTA(AT2,AZ2),"Pending","No"))

Excel 2010
ATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJ
1
238290-IOS-PC954030-Aug-18TRUEYes
338290-IOS-PC954130-Aug-18FALSEPending
438290-IOS-PC9542FALSEPending
5FALSENo
Sheet1
Cell Formulas
RangeFormula
BJ2=IF(BI2,"Yes",IF(COUNTA(AT2,AZ2),"Pending","No"))
BJ3=IF(BI3,"Yes",IF(COUNTA(AT3,AZ3),"Pending","No"))
BJ4=IF(BI4,"Yes",IF(COUNTA(AT4,AZ4),"Pending","No"))
BJ5=IF(BI5,"Yes",IF(COUNTA(AT5,AZ5),"Pending","No"))

Hi
Thank you for the response. So I figured out why this is not working. My data is taken from Access to Excel. In the table you put about for the scenario in Row 5 the result i was getting was "Pending" which was not the desired result. I have found that if i go to column AT and delete the empty cells then the formula works and returns a "No". For some reason it thinks there is data there and there isn't. Is there a way around this? I could always filter blank cells in this column and then delete. Let me know if you have any ideas. Thank you so much!

=IF(BI2,"Yes",IF(AT2&AZ2="","No","Pending"))

Last edited:
Hello
Thank you this works!! Appreciate all of your help!

Replies
8
Views
268
Replies
5
Views
548
Replies
1
Views
291
Replies
6
Views
483
Replies
0
Views
928

1,206,759
Messages
6,074,773
Members
446,086
Latest member
daywi

### 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.

### Which adblocker are you using?

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

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