Conditionally concatenate text

pdub

New Member
Joined
Aug 16, 2012
Messages
9
Hello,

What I'm looking to do is compare 4 cells containing dollar values to determine the minimum value. The cell to the right of each should then either display the value of the original cell (immediately to its left) if it is the minimum of the 4 cells being compared or the difference between the cells. This is fairly straight forward. I have accomplished this as follows (this is a formula in cell W14, comparing four values in cells R14, V14, Z14, and AC14):

=IF(V14=MIN($R14,$V14,$Z14,$AC14),V14,V14-MIN($R14,$V14,$Z14,$AC14))

I'd like to display a plus symbol when the value is greater than the minimum cell. For example:


RSVWZAAACAD
Bid 1Bid 1*Bid 2Bid 2*Bid 3Bid 3*Bid 4Bid 4*
14Price$5.00$5.00$7.00+$2.00$7.50+$2.50$6.50+$1.50

<tbody>
</tbody>

I tried to concatenate text in the IF statement for the [value_if_false] parameter, but only get an error.

I'd like to avoid using VBA, as this is for use by a client that is not familiar with VBA.

Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
The concatenate should work fine - please post the formula you attempted to use if this doesn't help:

=IF(V14=MIN($R14,$V14,$Z14,$AC14),V14,concatenate("+ $",V14-MIN($R14,$V14,$Z14,$AC14)))
 
Upvote 0
The concatenate should work fine - please post the formula you attempted to use if this doesn't help:

=IF(V14=MIN($R14,$V14,$Z14,$AC14),V14,concatenate("+ $",V14-MIN($R14,$V14,$Z14,$AC14)))

Thanks jackhandey, that is the formula I used. The problem is it removes any other number formatting from the cell, like commas and decimals. IE I get "+ $2309" rather than "+ $2,309.00"

Thoughts?
 
Upvote 0
Ahhh, gotcha. You can actually accomplish this with Conditional formatting. The process should be about the same with 2007 and 2010...

Looking at your cell W14 to start (keep the formula you're using in the original post):

Highlight the cell, click Conditional Formatting-> New Rule-> Use a formula to determine which cells to format

Enter this formula in the box: =not(W14=V14)
Click Format...
Under the Number tab, click Custom
Enter this in the "Type:" box: "+ "$#,##0.00

All it's doing is saying if the comparison value is not the same as the formula result, give the currency result but add a "+ " in front. If you don't want the space between the plus and the dollar sign, you can remove the space from within the quotes.

Since your comparison calculation cells are all the same relative position away from the cell they're looking at, you can copy the cell with the conditional formatting and paste only the format into the other cells. As long as the formula you entered in the box was in relative format, it will adjust to wherever you copy it.
 
Upvote 0

Forum statistics

Threads
1,216,074
Messages
6,128,649
Members
449,462
Latest member
Chislobog

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