View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.worksheet.functions
janabanana janabanana is offline
external usenet poster
 
Posts: 12
Default Need a formula to give me the last value in a column.

here goes:
i have 3 sheets: LOG, PRINT, OPERATORS
LOG: column I contains the formula: =VLOOKUP(H2,'OPERATORSLIST'!a:D,4,FALSE)
the "H2" in the fomula changes to "H3, H4..." depending on what row you are
on. this looks at the OPERATORS LIST and returns the value in column D after
it matches the operator number i typed in H.
I have a conditional format for column I that is =ISERROR(I2) format font to
white. This hides the error messages that I get in the rows that I have not
used yet. It also displays this error message (#N/A) if it cannot match a
number with a name.
PRINT: cell E51 contains the formula:
=LOOKUP(2,1/(LOG!I1:I1000<0),LOG!I1:I1000) this looks for the last populated
cell in LOG column I and displays the value found there. A cell with the
error message #N/A is considered a blank cell.

I want PRINT!E51 to be blank if it finds an error message in LOG!I, if
anything in that same row is non-blank. In otherwords, PRINT!E52 should look
to see if there are any populated columns in the last used row of LOG!, if
there is, always use the value in column I, even if it is blank.

did that help?
--
jana


"Pete_UK" wrote:

Is the formula that returns the operator's name a VLOOKUP or INDEX/
MATCH type formula? If so, then you can avoid returning the #N/A error
by changing it to something like this:

=IF(ISNA(your_formula),"",your_formula)

Then see what effect this has on your formula in the PRINT sheet to
return the last non-blank cell.

Hope this helps (in Biff's absence).

Pete

PS. It always helps to post the formulae that you are using.

On Aug 14, 1:53 pm, janabanana
wrote:
ok, Mr. Formula Man, here is another one for you:
i hope i can describe it well enough for you.
formula history:
sheet = LOG
sheet = PRINT
In the LOG sheet, i have a column (X) that contains a formula where if i
type in a number in another column(Y), it returns a name that equals that
number (displays an operator's name instead of the operator's number).
then in the PRINT sheet, i have a formula that looks back at the LOG sheet,
finds the last non-blank cell in column X, and displays it's value in
PRINT!E51
Problem:
if i type in a number in LOG!columnY, sometimes that number does not have a
name associated with it. in that case, it returns #n/a, i have a conditional
format in this column that says if the return is an error (#n/a) then hide it
(font=white).
but, back in the PRINT sheet, it is still returning the last non-blank cell.
What i need it to return in PRINT! is a blank cell since it couldn't find a
name to match the number.what i want it to do is look at the first non-blank
ROW in the LOG,
formula in PRINT sheet something like this: Destination cell (PRINT!E51) go
to the last non-blank row in LOG!columnA, if it is non-blank, then use the
value in LOG column X, no matter what it is, not necessarily the last
non-blank in column X.

if you are still confused about what i want, i could maybe try sending you
the workbook
--
jana