Chris_AAA
09-16-2014, 04:47 AM
Hi All
Im wondering if you are able to help on the below...... or advise of any ideas.....
I have the below code which performs a vlookup and fills down - as per code below.
However on a monday, given a weekend there might not be any data to lookup - and therefore debugs, because there is nothing to fill down.
Im revisiting some of my current code and fixing the gaps such as this one, and trying to learn from it. Im extremely new to VBA, so please excuse my ignorance.
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[2],'DATA!C[-1]:C[30],32,)"
lnglastrow = ActiveSheet.UsedRange.Rows.Count
Selection.AutoFill Destination:=Range("C2:C" & lnglastrow)
I am guessing the code needs to read before the above code..... 'If no data on row 2, then skip this process and move to the next line of code after the vlookup piece'
Im looking forward to any replies....
Thank you.
Im wondering if you are able to help on the below...... or advise of any ideas.....
I have the below code which performs a vlookup and fills down - as per code below.
However on a monday, given a weekend there might not be any data to lookup - and therefore debugs, because there is nothing to fill down.
Im revisiting some of my current code and fixing the gaps such as this one, and trying to learn from it. Im extremely new to VBA, so please excuse my ignorance.
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[2],'DATA!C[-1]:C[30],32,)"
lnglastrow = ActiveSheet.UsedRange.Rows.Count
Selection.AutoFill Destination:=Range("C2:C" & lnglastrow)
I am guessing the code needs to read before the above code..... 'If no data on row 2, then skip this process and move to the next line of code after the vlookup piece'
Im looking forward to any replies....
Thank you.