Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Cells not calculated

I have a spreadsheet that is output from an Access form.

H7 (General format) holds =SUM(H2:H5). This is right-justified.
Autocalculation is on
H2 to H5 (General format) hold what appears to be numbers and is
left-justified.
H7=0
If I reformat H2 to H5 as number with 2 decimals, the appearance doesn't
change and H7 remains at zero.
If I double click on eg H3, then click elsewhere, H7=H3.

So it appears that the numbers in H2 to H5 are actually text.

This all used to work, but some changes have been made to the database and
now we have this problem. If I can't find the root cause (ie why Access it
outputting in this way), how can I programmatically change the values in
column H into numbers?

Ian


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Cells not calculated

Hi Ian,

You can programmatically mimic the manual solution:

Format an empty cell as number (just to be sure)
EditCopy
Select your "numbers"
EditPaste special, check Add

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Ian" wrote in message ...
|I have a spreadsheet that is output from an Access form.
|
| H7 (General format) holds =SUM(H2:H5). This is right-justified.
| Autocalculation is on
| H2 to H5 (General format) hold what appears to be numbers and is
| left-justified.
| H7=0
| If I reformat H2 to H5 as number with 2 decimals, the appearance doesn't
| change and H7 remains at zero.
| If I double click on eg H3, then click elsewhere, H7=H3.
|
| So it appears that the numbers in H2 to H5 are actually text.
|
| This all used to work, but some changes have been made to the database and
| now we have this problem. If I can't find the root cause (ie why Access it
| outputting in this way), how can I programmatically change the values in
| column H into numbers?
|
| Ian
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Cells not calculated

Thanks, Nick. I hadn't realised that this could be done. I had assumed that,
as the values appear to be numbers, then changing the format to number
should be sufficient. It obviously wasn't and your solution has worked (at
least manually).

I'm still hoping I can get the correct output from Access in the first
place, but otherwise implementation of this method in code will be an easy
fix. In fact, I might implement it anyway for ALL the numeric values in the
sheet, as it isn't going to cause any problems with "working" values anyway.

Ian

"Niek Otten" wrote in message
...
Hi Ian,

You can programmatically mimic the manual solution:

Format an empty cell as number (just to be sure)
EditCopy
Select your "numbers"
EditPaste special, check Add

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Ian" wrote in message
...
|I have a spreadsheet that is output from an Access form.
|
| H7 (General format) holds =SUM(H2:H5). This is right-justified.
| Autocalculation is on
| H2 to H5 (General format) hold what appears to be numbers and is
| left-justified.
| H7=0
| If I reformat H2 to H5 as number with 2 decimals, the appearance doesn't
| change and H7 remains at zero.
| If I double click on eg H3, then click elsewhere, H7=H3.
|
| So it appears that the numbers in H2 to H5 are actually text.
|
| This all used to work, but some changes have been made to the database
and
| now we have this problem. If I can't find the root cause (ie why Access
it
| outputting in this way), how can I programmatically change the values in
| column H into numbers?
|
| Ian
|
|




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
max and calculated cells RickP25 Excel Discussion (Misc queries) 1 April 17th 08 05:15 AM
charts with calculated cells Peter T Excel Programming 0 January 16th 07 08:29 PM
Calculated value to run across cells ?? Corey Excel Worksheet Functions 1 June 22nd 06 08:27 AM
Calculated cells in Excel Lana Excel Worksheet Functions 2 January 19th 06 04:31 PM
UDF was not being calculated for all cells grahamd Excel Programming 2 October 14th 04 03:25 PM


All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"