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
56
Office Version
  1. 365
Platform
  1. Windows
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 :banghead:

Any help greatly appreciated!

Thanks in advance,
Remco

RWXhfp8_bCtsWU1T7DLFyr1EY5Xq9LVf_Z_USRqgcPc
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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