Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
skip blank rows
how do i skip blank rows? sheet 1 has d10=alex, d17=ben, d24=carlo, i
transferred them to sheet 2, B4 alex 1 <blank <blank B11 ben 2 <blank <blank B18 carlo 3 what do i need to add in my code? Sub Macro1() Application.ScreenUpdating = False rowref = Sheet6.Cells(2, 2) Sheets("Dept Summary").Select a = 3 For X = 10 To rowref Step 1 a = a + 1 Name = Sheet2.Cells(X, 4) Sheets("PHTemp").Select Cells(a, 2) = Name Next X Sheets("Dept Summary").Select destcol = 3 For rowtocopy = 10 To rowref Step 1 destcol = destcol + 1 Range(Cells(rowtocopy, 29), Cells(rowtocopy, 35)).Select Selection.Copy Sheets("PHTemp").Select Cells(destcol, 5).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Sheets("Dept Summary").Select Next rowtocopy Sheets("PHTemp").Select Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to number but skip blank rows | Excel Discussion (Misc queries) | |||
copy from one sheet to another and skip the blank rows | Excel Discussion (Misc queries) | |||
Need simple code to skip blank rows | Excel Programming | |||
skip blank rows when pasting formulas | Excel Worksheet Functions | |||
how to skip the blank cells | Excel Discussion (Misc queries) |