problem with scientific notation output

ericsemail

New Member
Joined
Sep 23, 2006
Messages
3
Hi, I have two lists set up, and I wrote a loop to loop through both list subtracting the numbers that have corresponding types that appear in both lists. Everything is working great... problem is, on the last number... i have 112 minus 112.04... i store this in a variable and msgbox the variable, i get the right answer in scientific notation, when i output this to the cell, it's in scientific notation.... i'm trying to get this to be.. -.04 and not in scientific notation... not having any luck... i know i can format the cell individually, but the cell will change, so doing it manually won't work.. any help will be great. thanks
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi welcome to the board!

Changing a number format on a cell does not change its contents, just how it is displayed.

In VBA,
something like this, perhaps:
Code:
Range("A1").NumberFormat = "#.00;-#.00;.00"
 
Upvote 0
Hey, I just tried that, and no dice... i put that right after the the loop to output the values.... still coming up in scientific notation :(
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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