vba: I need to understand how to put a variable(column letter) with a cell number.
I have code that assigns variable mRangeName to a Column Letter (in this case G)
This variable changes with every workbook, so in the vba code below. I need to know how to represent the changing Column Letter ?
This part in the code below:
how to represent [A2] WITH mRangeName and the numeric 2
With wks.Range(wks.[mRangeName & 2] <-------------------------
Public Sub FillColBlanks()
'fill blank cells in column 'mRangeName' with "No Data" above
Dim wks As Worksheet
Set wks = ActiveSheet
On Error Resume Next
With wks.Range(wks.[A2], wks.Cells(65536, 1).End(xlUp))
.SpecialCells(xlCellTypeBlanks).value = "NoData"