Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am new to VBA. I recorded a macro and applied it to the command
button to fill two seperate ranges down. Now I want to edit the code to do the following: After I run (click the command button), the cursor stops at the cell "F1169". I fill in the cells in column "H" with an "x" to indicate I have finished analyizing that row. I would like the cursor to change locations based on if the cell in column H is blank by going to the last cell in column H with an "x" and then offset (-1,-2). Also, when I recorded the macro, I set the range (to fill down) to 1500. I add new rows to include more data daily. The 1500# was overkill and I only used it because I will never have that much data. I would like to clean up the range down to stop if there is nothing in the last row of column "C". I hope some of this makes sense. I have been researching to find an answer on my own with no luck. Please help. Private Sub CommandButton1_Click() Range("F4").Select Selection.AutoFill Destination:=Range("F4:F1500"), Type:=xlFillDefault Range("F4:F1500").Select ActiveWindow.LargeScroll Down:=-42 ActiveWindow.SmallScroll Down:=-21 Range("O4:P4").Select Selection.AutoFill Destination:=Range("O4:P1500"), Type:=xlFillDefault Range("O4:P1500").Select ActiveWindow.LargeScroll Down:=-19 ActiveWindow.SmallScroll Down:=249 Range("F1169").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stopping IF command from entering zero or 1 for blank cells | Excel Worksheet Functions | |||
Stopping blank page printing | Charts and Charting in Excel | |||
Stopping blank cells with formulae in from printing | Excel Programming | |||
counting from left to right and stopping when blank | Excel Discussion (Misc queries) | |||
Stopping chart line where 1 of 2 columns of data in calculation is blank | Charts and Charting in Excel |