Hello all, I am a recent college grad (<12mo) and recently began a new career as an analyst. I am working on a simple macro to change and move data into a uniform format and have run into a small snag. I am attempting to get the macro to completely skip blank cells (and preferably delete the empty blank cells from the list) as the function is, as of now, inputting a standard answer which makes every data set filled with generic duplicates.
I can input any number of initial data points between cells B2:B150 with any number of blanks mixed in and I will inevitably end up with all 150 cells of the range filled with data. I am trying to better understand and utilize VBA so I tried applying an IF to the function in question to return a "" upon <>"" but I continue to receive syntax errors and I feel like I'm barking up the wrong thought-tree.
Any help from the much more experienced and wiser folks around here?
Code in question:
Sub Pickup_Time()
'
' Pickup_Time Macro
'
'
Range("P2").Select
ActiveCell.FormulaR1C1 = "=ROUNDDOWN(RC[-1],-2)/2400+MOD(RC[-1],100)/1440"
Range("B2:B150").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-15
Range("O2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("N2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=TODAY()+3"
Range("N2").Select
Selection.AutoFill Destination:=Range("N2:N150"), Type:=xlFillDefault
Range("N2:N150").Select
ActiveWindow.SmallScroll Down:=-156
Range("P2").Select
Selection.AutoFill Destination:=Range("P2:P150"), Type:=xlFillDefault
Range("P2:P150").Select
Range("P2:P150").Select
Range("P3").Activate
ActiveWindow.SmallScroll Down:=-36
Range("Q2").Select
ActiveCell.FormulaR1C1 = "=RC[-3]+RC[-1]"
Range("Q2").Select
Selection.AutoFill Destination:=Range("Q2:Q150"), Type:=xlFillDefault
Range("Q2:Q150").Select
Selection.Copy
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yy h:mm;@"
Range("N2:R150").Select
Selection.ClearContents
End Sub
I can input any number of initial data points between cells B2:B150 with any number of blanks mixed in and I will inevitably end up with all 150 cells of the range filled with data. I am trying to better understand and utilize VBA so I tried applying an IF to the function in question to return a "" upon <>"" but I continue to receive syntax errors and I feel like I'm barking up the wrong thought-tree.
Any help from the much more experienced and wiser folks around here?
Code in question:
Sub Pickup_Time()
'
' Pickup_Time Macro
'
'
Range("P2").Select
ActiveCell.FormulaR1C1 = "=ROUNDDOWN(RC[-1],-2)/2400+MOD(RC[-1],100)/1440"
Range("B2:B150").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-15
Range("O2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("N2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=TODAY()+3"
Range("N2").Select
Selection.AutoFill Destination:=Range("N2:N150"), Type:=xlFillDefault
Range("N2:N150").Select
ActiveWindow.SmallScroll Down:=-156
Range("P2").Select
Selection.AutoFill Destination:=Range("P2:P150"), Type:=xlFillDefault
Range("P2:P150").Select
Range("P2:P150").Select
Range("P3").Activate
ActiveWindow.SmallScroll Down:=-36
Range("Q2").Select
ActiveCell.FormulaR1C1 = "=RC[-3]+RC[-1]"
Range("Q2").Select
Selection.AutoFill Destination:=Range("Q2:Q150"), Type:=xlFillDefault
Range("Q2:Q150").Select
Selection.Copy
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yy h:mm;@"
Range("N2:R150").Select
Selection.ClearContents
End Sub