TextBox.Value = WS column math with $ format???

Big Lar

Well-known Member
Joined
May 19, 2002
Messages
557
What’s the correct code to display the following BAD example in a UserForm Textbox?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Code:
[FONT=Verdana]TextBox12.Value = Format(Sheet1.Range("T:T").Value + Sheet1.Range(“U:U”) * 0.25, "$ #.00")[/FONT]
<o:p></o:p>
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
What do you mean by Sheet.Range("T:T").Value + Sheet1.Range("U:U") ?
If you want the value in columns T and U to be summed, the syntax for the Message box would be

Code:
TextBox12.Value = Format(Application.Sum(Sheet1.Range("T:T")) + Application.Sum(Sheet1.Range("U:U") / 4 , "$ #.00")
 
Upvote 0
Mike,
I wish to sum the valves in ColumnU / 4 plus the values in ColumnT.

I've tried your example and get a syntax error...which I can't find.
 
Upvote 0
Once again...

TextBox12.Value equals the sum of the values of (Sheet1 ColumnU divided by 4) Plus the values of (Sheet1 ColumnT)

My attempts result in "Expected )" or "syntax error".
 
Upvote 0
Darn, I mis- counted the number of parenthesis.

The Application.Sum for column U needs to be closed.
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,611
Members
452,931
Latest member
The Monk

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