Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel not seeing numbers as numbers??? 7

Status
Not open for further replies.

JBruyet

IS-IT--Management
Apr 6, 2001
1,200
US
Hey all,

I have a supervisor who is getting some web-based reports for some statistics. I'm trying to get some totals from the reports but formulas don't see the cells as numbers. If I have a formula like =SUM(G7:G26) I get zero as the answer, even though each cell has a number in it. AND, I don't get the little green corner that says it's a number formatted as text. I tried formatting the numbers in the cells as General, Number and General but no formulas see the numbers as numbers. I've even tried the following:

1) Copy clean blank cell and then go back to the Sheet containing your imported data.
2) Push F5 (to display the Go to dialog) and click Special then check Constants and click OK.
3) While all your data is selected go to Edit>Paste special then check the Multiply or Add option and click OK.

That just leaves me blank cells where I wanted to paste data. Any ideas???

Thanks,

Joe Brouillette
 
Joe,
=VALUE(A1) will return #VALUE! error value if cell A1 contains an ASCII 160 "space".

FWIW, you can use the Edit...Replace trick on an entire worksheet at a time.

Brad
 
If you want to have a go at using the code, and if this is to be repeated I would strongly suggest you do, then try here as a starting point:-

So where exactly do I put this macro code then??
faq707-5758

It really is quite simple to set up, and then will take only a second to run whenever you need it to.

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Hey anotherhiggins, I just followed your instructions and everything worked except for one small detail. In Excel 2003 I need to press [ALT] + [F11] instead of [Ctrl] + [F11] to open the VB Editor.

Now I'm off to see how to connect this "macro" to a button on the toolbar.

Thanks again all for everything!!!

Joe Brouillette
 
Oops. That's my mistake. It's [Alt]+[F11] on all versions as far as I know.

[tt]_____
[blue]-John[/blue][/tt]

Help us help you. Please read FAQ181-2886 before posting.
 
Joe,
The best place to store macros you'll be using all the time is in your Personal.xls workbook. This workbook is always opened when Excel launches, but remains invisible (though you can see it from the VBA Editor). If you don't have one, the easiest way to create it is to record a macro:
1) Start the macro recorder using the Tools...Macro...Record New Macro menu item
2) In the resulting dialog, go to the "Store macro in" field, and choose "Personal macro workbook"
3) Click "OK"
4) Click the "End macro" button on the macro toolbar. You don't need this macro to do anything other than create a copy of Personal.xls
5) ALT + F11 to open the VBA Editor, then paste your macros in a module sheet in Personal.xls
6) Use the File...Save button to save Personal.xls after the changes

If you want to add a button on a toolbar for your macro, then do the following:
1) Open the View...Toolbars...Customize menu item
2) Go to the Commands tab
3) Choose Macros in the toolbar selector on the left
4) Choose a smiley-face button on the right, then drag it up to the toolbar
5) Right-click the new button, then choose "Assign Macro" from the resulting pop-up. Pick the macro you want to link the button to in the next dialog, then click "OK"
6) If you want to choose a different button image, right-click the button one more time, then choose "Change Button Image". You can now pick from 42 different icons. If those choices don't satisfy your inner artist, choose "Edit Button Image" and then edit the 16x16 pixel grid to your heart's content. Note: if you get the Toolbar selection menu rather than the button context sensitive menu, just choose "Customize" and then right-click the button a second time.

Brad
 
Yep it all works! I just followed byundt's instructions on "connecting" a macro to a button and it worked great! I see people putting some stars up so here are a couple more!

Thanks again,

Joe Brouillette
 
Glad you got sorted :)

Same principle applies to almost all the code snippets you will see posted in these forums, so hopefully you'll now feel comfortable enough to play with a few more of them.

You will generally find them in the VBA Visual Basic For Applicatiosn (Microsoft) forum though.

Regards
Ken...........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top