LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Formatting issue

I have a simple worksheet that populates the sheet with numbers based
on 3 variables from a second sheet. Everything is working correctly up
until I add a couple of text characters to each entry: "in", it is the
last process that needs to be done to the numbers - unfortunately
doing this kills the number formatting.

An example of the number entries before the "in" is added at the end:

-0.00615808

After adding the "in":

-6.15808000000001E-03in

Below is part of the routine I am using (it's rough so don't mind the
basic format):

Do
i = i + 1
Sheets(sn).Cells(i, 2).Select
Selection.Value = Sheets("Parameters").Cells(i - 1,
2).Value - Sheets("Variables").Cells(2, 3).Value
Selection.NumberFormat = "0.00000000"
Loop Until Sheets("Parameters").Cells(i, 1).Value = a

i = 0
Do
i = i + 1
Sheets(sn).Cells(i, 1).Select
Selection.Value = Selection.Value & "in"
Sheets(sn).Cells(i, 2).Select
Selection.Value = Selection.Value & "in"
Loop Until Sheets("Parameters").Cells(i, 1).Value = a & "in"

Any help is appreciated.

Chad

 
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
Formatting issue Iriemon Excel Worksheet Functions 2 February 24th 10 03:23 PM
Formatting issue Kathie Excel Discussion (Misc queries) 2 February 2nd 10 01:11 PM
Formatting Issue Mike Excel Discussion (Misc queries) 3 June 18th 09 12:38 AM
Formatting issue Ramone Excel Discussion (Misc queries) 1 February 19th 07 02:50 AM
Formatting issue ??? yarrakid Excel Discussion (Misc queries) 0 June 13th 06 09:31 AM


All times are GMT +1. The time now is 12:31 PM.

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

About Us

"It's about Microsoft Excel"