IF Statement-Multiple Criteria to Change Results in a Column

smurphy208

New Member
Joined
Dec 27, 2017
Messages
7
Hello-
I have a customer transaction spreadsheet that I export out of QuickBooks and it looks mostly like this:

Column A -Customer NameColumn B-TypeColumn F-Amount
01-ABCInvoice50.00
Payment50.00
Invoice100.00
Invoice50.00
Payment50.00

<tbody>
</tbody>






I'm looking for any suggestions that will look up what is in Column B and if it says "Payment" it will make the value in Column F be a negative. Example Payment of 50.00 would show as -50.00. If it says "Invoice" then it would leave the value as is.

I can get an IF formula to do one or the other but not both together. =IF(B4="Payment",-F4)
I'm sure this is super easy but I can't seem to figure it out, lol.
Thank you so much for your help!
 
Last edited:

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.
Of course you can nest IFs:

=IF(B4="Payment",-F4,IF(B4="Invoice",F4,0))

P.s. You can also create a dictionary to use with other formulas, but this would be helpfull if you had more cases than 2. :)
 
Last edited:
Upvote 0
THANK YOU!!!!
I knew it was something simple like a coma in the right location!!!
Not sure what you mean by a dictionary, though. My spreadsheet is rather large but I can fill series the formula.
Thanks again so very much!
 
Upvote 0
You're welcome. :)

P.s. Dictionary is a "side table" where you can enter information about what do you want to find, and then what value you want to get in return.

I.e. You have only two cases here: INVOICE and PAYMENT. What if there was a 3rd option? INVOICE CORRECTION (this is how it is called in english right? :) ) cause of prices miscalculation or client returns goods. In this case you would need 3 IFs nested. With a dictionary you don't need that. Just do this:

ABCDEFGHI
1CustomerTypePriceProper valueTypeSign
2Cust1invoice44invoice
3Cust2payment5-5payment-
4Cust3correction10-10correction-

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
D2=INDEX($I$2:$I$4,MATCH(B2,$H$2:$H$4,0))&C2
D3=INDEX($I$2:$I$4,MATCH(B3,$H$2:$H$4,0))&C3
D4=INDEX($I$2:$I$4,MATCH(B4,$H$2:$H$4,0))&C4

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

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