formatting question

maxx_daddy

Board Regular
Joined
Dec 3, 2010
Messages
74
Hi all,
My software for work allows me to export a sheet as excel, but the numbers are not formatted as numbers. I am attempting to copy a cell with a price which has a "$" in front of it and paste it into a cell in my workbook that will auto sum. I have been successful in getting rid of the "$" using a MID formula and another destination cell. However the auto sum doesnt recognize the new cell and does not auto sum correctly. Thoughts of how I could paste a cell as a number? I'm a novice and this community has really helped a tremendous amount. Paste doesn't work in any fashion. The code is large, let me know what you would want to see and I will paste it here.

Thanks,

Joe.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi maxx,
Beetwen two worksets you can try to Paste Special as Values.
To post data here:
You can download and install two of the following programs:

HTLMaker

or
Excel Jeanie


or when using Internet Explorer just put borders around your data in Excel and copy those cells into your post.
 
Upvote 0
Here is what I'm using currently.
Code:
'total sale
Windows("a.xls").Activate
Range("AL34").Select
'[AL34].NumberFormat = "0.00" <-- didn't work
Selection.Copy
Windows("SDT2012.xlsm").Activate
Range("G14").Select
'g14 is new dest cell
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
Range("f14").Copy
'f14 has MID function and is formatted as currency
Range("g2").Select
'g2 is my desination cell, it is linked to a userform, in a perfect world i would just paste the data here (if I could format it correctly prior to pasting)
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
 
Application.Run "SDT2012.xlsm!Unshow" 'hides some sheets
Application.Run "SDT2012.xlsm!UF1S" 'shows the userform, i enter who bought it and who sold it and wallah
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,637
Members
449,177
Latest member
Sousanna Aristiadou

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