If cell contains character, then use amount with a + or - sign

Rock5150

Board Regular
Joined
Nov 16, 2012
Messages
74
Office Version
  1. 365
Platform
  1. Windows
Hello all,

I have a spreadsheet where column E needs to be filled with an amount depending on whether another cell in column F has either a + or - sign.

For example:

F2 has "+ ACH PreAuthorized", G2 has "322.1". I would like to have cell E2 fill in the amount "+322.1". So in cell E2, if F2 has a plus sign, then put in the amount in E2. If it has a - sign, put in the amount from G2 into E2 but put a - sign in front of the amount. If there is no sign at all, put a zero or leave blank.

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
A small correction in the above formula :

=1*(LEFT(F2,1)&G2)
You do not need to include the second argument for the LEFT function when that argument is 1 because the function defaults to 1 when its omitted (same holds true for the RIGHT function as well, but not for the MID function though). The formula I posted works fine as posted... no correction is necessary. Try it.
 
Upvote 0

Forum statistics

Threads
1,203,464
Messages
6,055,573
Members
444,799
Latest member
CraigCrowhurst

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