Re: VBA?Macro Newbie Question//Last field in a column with a value.

From: Dave Peterson (ec35720_at_msn.com)
Date: 02/27/04


Date: Thu, 26 Feb 2004 20:28:45 -0600

Do you have any data in that range (row 17 to 65536)?

If you do, then this should have worked ok.

If you don't, you could add:

=if(count(f17:f9999)=0,"",originalformulahere)

This checks for a number in F17:F9999 (adjust the range if you need more rows).

but you could adjust the range to look in the formulas, too.

=LOOKUP(9.99999999999999E+307,Sheet1!F17:F9999)
=INDEX(Sheet1!G17:G9999,MATCH(9.99999999999999E+307,Sheet1!F17:F9999))

But this adjustment won't help if you don't have data in there--you need
something like the first (count()).

"jctlcdc <" wrote:
>
> Okay, that works, sort of. The problem is that my actual dates and
> payments don't start until row 17 and I have a lot of stuff above that
> is just client info like name, dob, admitted, etc. Is there anyway to
> do it without changing all of that? I mean, just have it start the
> lookup and match on row 17. What I get now for date is the clients
> first name which is B1 and #NA for amount.
> the actual Dates start at B7 and the Amounts at I7.
>
> Lst Pmt Dt Lst Pmt Amt
> Sharron #N/A
>
> ---
> Message posted from http://www.ExcelForum.com/

-- 
Dave Peterson
ec35720@msn.com