finding the last cell with content

L

Lonnie

I've searched and found a few posts that come close, but
didn't really hit what I'm trying to do.

I'm having problems determining my range in a macro. I'm
running an equation L=(K-J)/K. I want my range to be K2
thru (the last cell in K that has a value)

Can anyone help me determine the code?

Thanks for your help.

Lonnie
 
M

merjet

I'm having problems determining my range in a macro. I'm
running an equation L=(K-J)/K. I want my range to be K2
thru (the last cell in K that has a value)

Can anyone help me determine the code?

iRow = Sheets("Sheet1").Range("K65536").End(xlUp).Row
Set rng = Sheets("Sheet1").Range("K2:K" & iRow)

HTH,
Merjet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top