I was trying to select from A55 to the last row that is filled from A column in Excel using Powershell script.
My first script worked perfectly which is
$lastRow = $ivWorksheet.Cells.Item($ivWorksheet.Rows.Count, "A").End(3).Row
$ivRange = $ivWorksheet.Range("A55:A$lastRow")
however when i changed above into below, it was not working.
$startRow = 55
$lastRow = $ivWorksheet.Cells.Item($ivWorksheet.Rows.Count, "A").End(3).Row
$ivRange = $ivWorksheet.Range("A$startRow:A$lastRow")
i was expecting both script to have same result but the latter one did not work. could you please advise what is the reason?
New contributor
Sangwon Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.