my $last_cell = $Sht1->Range("A1")->EntireColumn-> SpecialCells(xlCellTypeLastCell)->{Address}; (my $last_col, my $last_row) = $last_cell =~ /\$(\w+)\$(\d+)/;