Hi All,
I won't hide this, I'm starting adventure with VBA now.
Someone from company has created below macro - I wanna to develop it.
If there is more rows, then auto fill is working. If one row or nothing, then I see following error:
So, how to fix it ? Current macro looks as following:
As you can see: Delivery No. is dynamic. Sometimes I need to update values in SAP for 1 delivery no, sometimes we have more.. and from time to time there is nothing to update.
To prepare upload file I need to get working VBA code. Above generates error as I attached.
Any clue what should be added/changed in above ?
Thanks in advance,
Adam
I won't hide this, I'm starting adventure with VBA now.
Someone from company has created below macro - I wanna to develop it.
If there is more rows, then auto fill is working. If one row or nothing, then I see following error:
So, how to fix it ? Current macro looks as following:
VBA Code:
Range("D2").Select
ActiveCell.Value = today
Selection.AutoFill Destination:=Range("D2:D" & last_row), Type:=xlFillDefault
Range("E2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]>RC[-3]"
Selection.AutoFill Destination:=Range("E2:E" & last_row), Type:=xlFillDefault
As you can see: Delivery No. is dynamic. Sometimes I need to update values in SAP for 1 delivery no, sometimes we have more.. and from time to time there is nothing to update.
To prepare upload file I need to get working VBA code. Above generates error as I attached.
Any clue what should be added/changed in above ?
Thanks in advance,
Adam