concatenate question with negative numbers

johnny52

Active Member
Joined
Oct 13, 2006
Messages
325
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
Hi ,

my question ...I have 2 numbers in 2 different cells...one is a negative number.When I use the concatenate formula the result is as follows
cell a1 = 7 cell b1 = -9

=concatenate(a1," - ",b1) the result in the cell looks like 7 - -9

can I write a concatenate formula to put the negative number with parenthesis...so it would look like this 7 - (9) all in one cell ?


Thanks everybody :)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Lewiy

Well-known Member
Joined
Jan 5, 2007
Messages
4,284
Maybe something like this:
Code:
=IF(A1<0,"("&ABS(A1)&")",A1)&"-"&IF(B1<0,"("&ABS(B1)&")",B1)
 

Boller

Banned
Joined
Apr 11, 2006
Messages
2,328
If A1 is always positive and B1 is always negative :-

=A1 & TEXT(-B1,"-(#,###)")

or

=A1 & "-(" & -B1 & ")"
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Are you just dealing with integers?

Try

=TEXT(A1,"0;(0);0")&"-"&TEXT(B1,"0;(0);0")
 

johnny52

Active Member
Joined
Oct 13, 2006
Messages
325
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
=IF(A1<0,"("&ABS(A1)&")",A1)&"-"&IF(B1<0,"("&ABS(B1)&")",B1)

wow thanks everybody for the great answers this one worked :) :) :)
 

Forum statistics

Threads
1,181,102
Messages
5,928,062
Members
436,586
Latest member
latintxn

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
Top