HELP ME PLEASE ---- COMPUTERS ARE STARTING TO FLY!

kathleen

Active Member
Joined
Dec 16, 2002
Messages
295
I have a web page (I created it in the so called compatiable product of FrontPage :diablo: ) that's using an Office Component to deliver a Office Spreadsheet. When the user views the page they see an edit with Excel option.

My problem is that it is delivering the Spreadsheet in text format. One of the columns is formatted in Currency. I can strip the $ out and the commas out but Excel is still treating it as text. There is a space at the end of the field that I can not eliminate. Any clues? :banghead: :banghead: :banghead:
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
kathleen said:
I have a web page (I created it in the so called compatiable product of FrontPage :diablo: ) that's using an Office Component to deliver a Office Spreadsheet. When the user views the page they see an edit with Excel option.

My problem is that it is delivering the Spreadsheet in text format. One of the columns is formatted in Currency. I can strip the $ out and the commas out but Excel is still treating it as text. There is a space at the end of the field that I can not eliminate. Any clues? :banghead: :banghead: :banghead:

With cell still formatted as currency and text, try

=--TEXT(A1,0)
 
Upvote 0
Thanks but now i get a #VALUE on it. Did I mention that the number should be 7 characters long without # and comma but when I perform a length function it returns as 8.

BTW what does the -- behind the = sign mean?
 
Upvote 0
The -- bit coerces a numeri from a text value; wonder if you've got the {shudder} dread CHAR(160) in there -- there's a macro called TrimAll here somewhere that handles that and spaces as well. Will find it if time.
 
Upvote 0
I am sorry, didn't mean to tee anybody off. Nothing but the highest respect for you all. Didnt know about the other site. Will check there as well. Thanks for the tip.
 
Upvote 0
Here it is -- http://www.mrexcel.com/board2/viewtopic.php?t=71961&highlight=trimall+macro
Sub TrimALL()
'David McRitchie 2000-07-03 mod 2000-08-16 join.htm
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range
'Also Treat CHR 0160, as a space (CHR 032)
Selection.Replace What:=Chr(160), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
'Trim in Excel removes extra internal spaces, VBA does not
On Error Resume Next 'in case no text cells in selection
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
cell.Value = Application.Trim(cell.Value)
Next cell
On Error GoTo 0
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
 
Upvote 0
kathleen said:
I am sorry, didn't mean to tee anybody off. Nothing but the highest respect for you all. Didnt know about the other site. Will check there as well. Thanks for the tip.

:rofl: I AM SO SORRY -- I was making an aside to Brian about the lady golfer out in Hawaii! You're just fine -- I'M the one who needs to apologise! Please accept.
 
Upvote 0

Forum statistics

Threads
1,223,945
Messages
6,175,556
Members
452,652
Latest member
eduedu

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