nested

HvdH

New Member
Joined
Sep 6, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
hi. I am new to the website. I have a column with the words "cashbook", "invoice" or "credit", and next to it the amounts column. I want to us a nested function with the search function, to give the value from the amounts column, if for example the word = "invoice"
the formula currently looks like this
=IF(SEARCH("Cashbook",E4),0,AND(IF(SEARCH("Invoice",E4),J4,"")))

If the word is "cashbook", the result is 0, but in the next line ,the word is "invoice", then the result = #VALUE

please assist
 

Attachments

  • Screenshot 2024-09-06 090435.png
    Screenshot 2024-09-06 090435.png
    68.4 KB · Views: 6

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You have a couple of problems.
Firstly, =SEARCH does not return zero if the search string is not found. Instead it returns an error, so your formula needs to trap the error.
Secondly, you can't use the AND formula like that. In your case you need a nested IF statement i.e. use another IF when the first IF evaluates to FALSE.

I hope I've interpreted what you're trying to do correctly, so try this formula. If not, come back.
Excel Formula:
=IF(NOT(ISERROR(SEARCH("Cashbook",A4))),0,IF(NOT(ISERROR(SEARCH("Invoice",A4))),E4,"Not found"))
 
Upvote 0
you need isnumber()
=IF(ISNUMBER(SEARCH("cashbook",A4)),0,IF(ISNUMBER(SEARCH("invoice",A4)),E4,""))

Book2
ABCDEFG
2
3
4GL Cashbook 123417650
5Invoice 1234745745
6 
7GL Cashbook 34517650
8Invoice 678745745
9Credit Note CN122216285 
Sheet1
Cell Formulas
RangeFormula
G4:G9G4=IF(ISNUMBER(SEARCH("cashbook",A4)),0,IF(ISNUMBER(SEARCH("invoice",A4)),E4,""))
 
Upvote 0
you need isnumber()
=IF(ISNUMBER(SEARCH("cashbook",A4)),0,IF(ISNUMBER(SEARCH("invoice",A4)),E4,""))

Book2
ABCDEFG
2
3
4GL Cashbook 123417650
5Invoice 1234745745
6 
7GL Cashbook 34517650
8Invoice 678745745
9Credit Note CN122216285 
Sheet1
Cell Formulas
RangeFormula
G4:G9G4=IF(ISNUMBER(SEARCH("cashbook",A4)),0,IF(ISNUMBER(SEARCH("invoice",A4)),E4,""))
Awesome, thank you
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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