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
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
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"
 

ericsemail

New Member
Joined
Sep 23, 2006
Messages
3
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 :(
 

Watch MrExcel Video

Forum statistics

Threads
1,113,808
Messages
5,544,408
Members
410,609
Latest member
agarci1096
Top