Writing a formula with formatting

kevt97

New Member
Joined
Jan 5, 2007
Messages
7
I'm constanting working with mixed data...units and dollars. Being able to write the formula such as this would help: =$30,000/20,000...(vs =30000/20000) everytime I try this I get an error. I dont want it to be text. I want to enter into the cell with commas and dollar signs. I used Excel everyday for over 10 years and never thought to do this. Does anyone know how ?
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

GTO

MrExcel MVP
Joined
Dec 9, 2008
Messages
6,154
Hi Kev,

I am less than stellar w/formulas and may misunderstand what it is you are after, but have you tried DOLLAR?

If A1 = $30,000.00
B1 = 20000

=DOLLAR(A1/B1,2)

...would return $1.50

Does that help?

Mark
 

shemayisroel

Well-known Member
Joined
Sep 11, 2008
Messages
1,867
I'm constanting working with mixed data...units and dollars. Being able to write the formula such as this would help: =$30,000/20,000...(vs =30000/20000) everytime I try this I get an error. I dont want it to be text. I want to enter into the cell with commas and dollar signs. I used Excel everyday for over 10 years and never thought to do this. Does anyone know how ?

Interesting query but not sure if possible as excel uses the $ within formulas for absolute referencing and uses the comma to seprate functions within the formula... etc
 

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,939
Welcome to the Board!

If you really must do this or really want to, you will need to put them in quotes:

="$30,000"/"20,000"

And if you want it to come out with dollar signs you will need to format the cell as such or use text to do it:

=TEXT("$30,000"/"20,000","$ #.00")

Hope that helps.
 

shemayisroel

Well-known Member
Joined
Sep 11, 2008
Messages
1,867

ADVERTISEMENT

Welcome to the Board!

If you really must do this or really want to, you will need to put them in quotes:

="$30,000"/"20,000"

Hope that helps.

Hmmm yeah that is a way around it...
 

kevt97

New Member
Joined
Jan 5, 2007
Messages
7
Thank you so much, never knew that "" was the work around. any issues I need to worry about if I do that ?
 

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,939
I'm not aware of any issues other than maybe with other compatibilty versions of Excel. Not sure if a Non-US version would recognize the dollar sign and know that this should be numbers, but I would assume that it would be fine across all versions.

Glad that helps.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,551
Messages
5,596,797
Members
414,103
Latest member
imamalidadashzada

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