I have the following VBScript code.
It is giving me as output
Last row: 1048458
Last column: 30
Value:
I have no data in the above mentioned cell. My last row with data is in row 187, last column:J
Why am I getting such an output? I would appreciate help in resolving this.
Code:
lastRow = editWorkbook.Sheets(sheetName).UsedRange.Rows.Count
lastColumn = editWorkbook.Sheets(sheetName).UsedRange.Columns.Count
WScript.Echo ("Last row:" & CStr(lastRow))
WScript.Echo ("Last column:" & CStr(lastColumn))
WScript.Echo("Value:" & CStr(editWorkbook.Sheets(sheetName).Cells(lastRow,lastColumn).Value))
It is giving me as output
Last row: 1048458
Last column: 30
Value:
I have no data in the above mentioned cell. My last row with data is in row 187, last column:J
Why am I getting such an output? I would appreciate help in resolving this.