Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Find the last used cell in a column

$
0
0

Hi all,

I am looking to use powershell to find the first empty cell in a column.

I have a spreadsheet that lists information in columns A-F for a migration. It lists all the batches, dates, sizes, etc. These are prepopulated for all batches

Column G onwards is used for the date and time certain steps started and finished. These are populated when that batch is processed.

I am trying to find the first empty cell in column G so that I can enter the time/date details with a script rather than having to trawl through logs to find the details.

I know how to use powershell to populate the cells with the data and this works fine in tests but I need to be able to find the first empty cell in column G as this "should" be the next batch

I have looked at the "usedrange" ($ws1.usedrange) option but that looks at all the cells I have populated and doesn't find the correct row

TIA

Andy


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>