Formula to search column X for text, when found, copy amount from column Y, but as negative

geertech

Board Regular
Joined
Dec 10, 2008
Messages
52
Dear all,
I need a formula to search Col C for "6-Kadobon-Behandeling", and if found, copy the amount on the same row in Col H into Cell H10, but then as a negative.

The data is exported as CSV from a POS system and needs to be converted and imported into a digital accounting system which requires a counterpart for these amounts.

Searched a lot of threads, but can't get it to work :oops:

Any help greatly appreciated!

Thanks in advance,
Remco

RWXhfp8_bCtsWU1T7DLFyr1EY5Xq9LVf_Z_USRqgcPc
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try this:

Code:
=(IF(ISERROR(VLOOKUP("6-Kadobon-Behandeling",$C$1:$H$9,6,0)),"",-(VLOOKUP("6-Kadobon-Behandeling",$C$1:$H$9,6,0))))

That will put in a Blank if it doesn't find that, other wise it will it will give you the value H. Put the formula in H10.

Not sure on your range so I put it from 1-9, but update as necessary.

Also assumes your value in H is a number.
 
Last edited:
Upvote 0
Thanks so much philwojo; works lika a charm!
This will save me a lot of time on a daily base!
 
Upvote 0

Forum statistics

Threads
1,216,468
Messages
6,130,800
Members
449,595
Latest member
jhester2010

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