Value in last occupied cell in row

B

Brian

Hi.

I'm relatively new to Excel, and require assistance in finding an
Excel function that will let me retrieve the data of the last occupied
cell in a range of rows. There might be blank cells both before and/or
after the last occupied cell, and that's where my problem arises.

For instance, consider the following table data (1st column is the row
number, D, E, F, etc... are the columns). I need the value in column K
(for each row) to show the data of the last occupied cell in the range
of colum D to column J, for any particular row.

D E F G H I J K
18 pass pass fail
19 fail 34567 pass
20 12345 pass
21 pass 23456

(sorry if it doesn't show up well, I'm using even spaced format as I
type this)

For row 18, cell K18 should show "fail", for row 19, cell K19 should
show "pass", for row 20, cell K20 should show "pass", but for row 21,
cell K21 should show "23456".

Any good suggestions? I'm not god at VBA, so I'd prefer to use
functions and formulas.

Thanks in advance. I hope my description here helps.

Brian Goudie
(e-mail address removed)
(e-mail address removed)
 
B

Brian

Wow, thanks Aladin. Worked like a charm. But how would I handle it if
a whole row of cells was blank?

Right now it just gives me #VALUE in column K.

Thanks again.

/Brian Goudie
 
B

Brian

Of course, I've used the COUNTA function before, I just didn't think
of it. Thanks again.

/Brian
 

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