Formula to find last value in a range & then offset

P

pete

Hi,
I'm trying to write a formula to find the last value in a row range and
then return the value 12 columns to the left of that value. I've tried
using offset but it isn't returning the value I expect:

=OFFSET(INDEX($P168:$AA168,COUNTA($P168:$AA168)),0,12)

Any help would be greatly appreciated

Pete
 
D

Don Guillett

try
=INDIRECT("a"&MATCH(9999,L:L))
=OFFSET(INDIRECT("l"&MATCH(9999,L:L)),0,-11)
 
R

Ron Coderre

Try something like this:

This formula locates the last NUMERIC value in Col_AA and returns the
corresponding value from Col_P:
=INDEX(P:p,MATCH(10^99,AA:AA))

This formula locates the last TEXT value in Col_AA and returns the
corresponding value from Col_P:
=INDEX(P:p,MATCH(REPT("z",255),AA:AA))

This ARRAY FORMULA locates the last NON-BLANK cell in Col_AA and returns the
corresponding value from Col_P:
=INDEX(P1:p65535,MATCH(2,1/(1-ISBLANK(AA1:AA65535))))

Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
B

Bob Phillips

How about

=OFFSET($P168,COUNTA($P168:$AA168)-1,-12)


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
P

pete

Thanks for your help but I've found the answer its:

=OFFSET(INDEX($P168:$AA168,COUNTA($P168:$AA168)),0,-12)

Quite simple thinking about it


Pete
 

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