+ Reply to Thread
Results 1 to 4 of 4

return data in cell to right of 2nd to last data entry in column

Hybrid View

  1. #1
    Registered User
    Join Date
    10-18-2013
    Location
    Ca, USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    return data in cell to right of 2nd to last data entry in column

    I have a column of numbers. I use a macro to insert data at the end of the column. I want to subtract the second to last number from the last number and divide the total by the data in the cell adjacent to the last cell. This is what I've done so far.

    =(LOOKUP(9.99E+307,Logs!A:A))-INDEX(Logs!A:A,AGGREGATE(14,6,(ROW(Logs!A:A)-ROW(Logs!A1)+1)/(Logs!A:A<>""),2))

    It gives me the difference. Now I need to divide this difference by the cell adjacent to the last.

    I wrote it like this and the results are invalid

    =(LOOKUP(9E+99+307,Logs!A:A))-INDEX(Logs!A:A,AGGREGATE(14,6,(ROW(Logs!A:A)-ROW(Logs!A1)+1)/(Logs!A:A<>""),2))/(LOOKUP(9E+99+307,Logs!B:B))

    Can someone please help

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: return data in cell to right of 2nd to last data entry in column

    corrected post below
    Last edited by Moo the Dog; 10-23-2013 at 08:58 PM.

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: return data in cell to right of 2nd to last data entry in column

    For the numerator and denominator, you have: (LOOKUP(9E+99+307...

    Shouldn't that be: (LOOKUP(9.99E+307...

    - Moo

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: return data in cell to right of 2nd to last data entry in column

    Can you post a few rows worth of sample data and tell us what result you expect?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 02-01-2013, 10:18 AM
  2. [SOLVED] How to get data from sheet 2 column, based on entry in sheet1 cell
    By dflow59 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-06-2012, 04:05 PM
  3. Replies: 0
    Last Post: 10-06-2011, 07:03 AM
  4. Referncing data in column A to determine Row for data entry
    By dtt084 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2010, 11:28 PM
  5. Return entry in column above/below cell
    By TheRobsterUK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2005, 11:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1