hi,pls help.
i have a main excel 2016 with a vba code in a button.
In sheet param, colum A is date and column B is file name.. After input the date DD-MON-YY
e.g "09-Oct-18" and file name can be anything prefix with the "_09-10-2018.xlsx";in that sheet 'Param'.;;
I want to use that data entry as parameter in the code.; How to do it?
If Format(Range("A" & i).Value, "d-mmm-yy") = "09-Oct-18" Then
Range("B" & i).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R2C1,'D:\akika\files\[CATEGORY_99_TAS_09-10-2018.xlsx]Sheet1'!R2C1:R30C2,2,FALSE)"
Range("G" & i).Select
ActiveCell.FormulaR1C1 = _
"='D:\akika\working\[consolidate.xlsx]Sheet1'!R4C3"
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
If Format(Range("A" & i).Value, "d-mmm-yy") = "15-Oct-18" Then
Range("B" & i).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R2C1,'D:\akika\files\[CATEGORY_99_TAS_15-10-2018.xlsx]Sheet1'!R2C1:R30C2,2,FALSE)"
Range("G" & i).Select
ActiveCell.FormulaR1C1 = _
"='D:\akika\working\[consolidate.xlsx]Sheet1'!R4C3"
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End If
i have a main excel 2016 with a vba code in a button.
In sheet param, colum A is date and column B is file name.. After input the date DD-MON-YY
e.g "09-Oct-18" and file name can be anything prefix with the "_09-10-2018.xlsx";in that sheet 'Param'.;;
I want to use that data entry as parameter in the code.; How to do it?
If Format(Range("A" & i).Value, "d-mmm-yy") = "09-Oct-18" Then
Range("B" & i).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R2C1,'D:\akika\files\[CATEGORY_99_TAS_09-10-2018.xlsx]Sheet1'!R2C1:R30C2,2,FALSE)"
Range("G" & i).Select
ActiveCell.FormulaR1C1 = _
"='D:\akika\working\[consolidate.xlsx]Sheet1'!R4C3"
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
If Format(Range("A" & i).Value, "d-mmm-yy") = "15-Oct-18" Then
Range("B" & i).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R2C1,'D:\akika\files\[CATEGORY_99_TAS_15-10-2018.xlsx]Sheet1'!R2C1:R30C2,2,FALSE)"
Range("G" & i).Select
ActiveCell.FormulaR1C1 = _
"='D:\akika\working\[consolidate.xlsx]Sheet1'!R4C3"
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End If