how to keep the same format

Tody03

New Member
Joined
Jun 21, 2014
Messages
48
I want to combine in one cell two numbers with different formats. How to maintain the percentage format

[TABLE="width: 671"]
<colgroup><col span="2"><col span="2"><col></colgroup><tbody>[TR]
[TD][TABLE="width: 724"]
<colgroup><col span="2"><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Command[/TD]
[TD="align: left"]Result [/TD]
[TD="align: left"]Desired display [/TD]
[/TR]
[TR]
[TD]-6%[/TD]
[TD]80[/TD]
[TD="align: left"]=B2&" "&A2[/TD]
[TD="align: left"]80 -0.0584795321637427[/TD]
[TD="align: left"]80 -6%[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: left"][/TD]
[TD="align: left"][/TD]
[TD="align: left"][/TD]
[/TR]
</tbody>[/TABLE]

thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi, you can try:

=B2&" "&TEXT(A2,"0%")
 
Upvote 0
I need your help again.
i tried to install your code into my macro and i got errors. can you help me to correct the the syntax

Range("G2").Select
ActiveCell.FormulaR1C1 = "=Rc[-3]&"",""&text(Rc[-4],0%)&"",""
Thanks
 
Upvote 0
i tried to install your code into my macro and i got errors. can you help me to correct the the syntax

Hi, the easiest way to get the correct syntax for formulas is to record a macro whilst you manually enter it into the cell.

The recorder gives..

Code:
Range("G2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]&"" ""&TEXT(RC[-2],""0%"")"

Which can then be simplified to..
Code:
Range("G2").FormulaR1C1 = "=RC[-1]&"" ""&TEXT(RC[-2],""0%"")"
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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