Help needed with Macro

L

Legacy 388346

Guest
Hi Everyone, I am hoping someone can help me with my issue.
I am trying to create a macro but there is one part where I am stuck. I need to insert a column, enter in 0 and convert to number with 2 spaces.
I am having two issues. 1. if i select the whole column it will add 0.00 all the way to end of sheet instead of where the last line of data is or. if I specify a row length it could again be adding to rows with no data or not extend far enough for all the data. Thanks:)

My macro before I add the new column in front of column C is here:

Sub Spa_Upload_drop()
'
' Spa_Upload_drop Macro
'
' Keyboard Shortcut: Ctrl+d
'
Columns("H:H").Select
Columns("H:H").Cut Destination:=Columns("E:E")
Columns("G:K").Select
Selection.Delete Shift:=xlToLeft
Columns("H:P").Select
Selection.Delete Shift:=xlToLeft
Columns("A:D").Select
Range("D1").Activate
Selection.Delete Shift:=xlToLeft
Rows("1:5").Select
Range("A5").Activate
Selection.Delete Shift:=xlUp
Columns("C:C").Select
End Sub
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,879
Office Version
365
Platform
Windows
Once you have deleted your columns, where do you want to insert the new column?
Also is there any paricular column that will always have data on the last row?
 

Watch MrExcel Video

Forum statistics

Threads
1,095,978
Messages
5,447,674
Members
405,462
Latest member
est1989

This Week's Hot Topics

Top