LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gladys
 
Posts: n/a
Default Insert Decimal Places and Clear Zeros

Thanks Miguel,

After I wrote the original question a light turned on.

I wrote a simple if statement =If(G10,G1*.01," ")

Duh.....

Thanks for your help!

"Miguel Zapico" wrote:

Hi,

I have recorded a macro while doing the following actions:
- Copy the range "I1" (it has the value 0.01)
- Select the range "G1:G3", where the example data was
- Menu Edit - Go to - Special - Constants to select non blank cells
- Menu Edit - Paste special - Multiply.

This is the macro recorded:
Sub Macro1()
Range("I1").Select
Selection.Copy
Range("G1:G3").Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End Sub

You can change the Ranges to match your case in the macro.

Hope this helps,
Miguel.

"Gladys" wrote:

I have users that import data into a large spreadsheet . The data is setup
without any decimal places. I also have a blank rows in between the data so
if I multiply the column by .01 the empty cells now have a zero (0). These
cells need to stay blank. Does anyone have any suggestions on how to
accomplish this task in one formula or code.

Example Cells G1 = 12345 and G2 = Blank and G3 = Blank and G4 = 45678

I would like data to be G1 = 123.45 G2 = Blank G3 = Blank and G4 = 456.78

Thanks for your help.

Gladys

 
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
Formula for: Format Decimal places? nastech Excel Discussion (Misc queries) 16 November 4th 05 02:25 PM
setting a floating decimel point Rose New Users to Excel 2 April 29th 05 06:10 PM


All times are GMT +1. The time now is 06:19 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"