demonLaMagra
demonLaMagra

Reputation: 409

excel VBA Range for columns using count

In my code I have the following statement that works just the way I want it. The question is how would I rewrite this to work for columns?

lastRow = Sheets(sName).Range("C" & Rows.count).End(xlUp).row

so far I have...

partNumber = Sheets("RM_RESULTS").Range(Columns.count & 1).End(xlLeft).Column

It's obviously something so simple but everything I try...no luck.

Upvotes: 0

Views: 297

Answers (1)

Kᴀτᴢ
Kᴀτᴢ

Reputation: 2176

partnumber = Cells(1, Columns.Count).End(xlToLeft).Column

Set Cells(1 as needed with your cellnumber

Upvotes: 1

Related Questions