+ Reply to Thread
Results 1 to 4 of 4

Find last cell value in column A where column B value is "Some value"

  1. #1
    Registered User
    Join Date
    04-22-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    59

    Find last cell value in column A where column B value is "Some value"

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi,

    I have an Excel 2007 table that records bank account transactions for several accounts.

    I am trying to return the account balance for the most recent transaction for each of the accounts. There is no time stamp with the transactions only a date so many will have the same most recent date. (there is no sorting on the table so most recent transactions are added to the bottom of the table if that makes any difference)

    I guess what I need as the question asks to look down column A containing bank account name and find the last instance of "Some account name" then return the value in the same row in column B.

    I am new to 2007 and tables so possibly there may be an alternative to this utilising the table object itself?. I need to be conscious of CPU overhead so if I can avoid an array formula to do this job all the better.

    Many thanks
    Last edited by coasterman; 09-22-2013 at 12:23 PM.

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

    Re: Find last cell value in column A where column B value is "Some value"

    Try this...


    Data Range
    A
    B
    C
    D
    E
    1
    Acct
    Balance
    -----
    Acct
    Balance
    2
    3
    92
    3
    50
    3
    4
    5
    4
    2
    84
    5
    5
    71
    6
    1
    71
    7
    1
    48
    8
    4
    49
    9
    3
    51
    10
    3
    21
    11
    1
    37
    12
    3
    50
    13
    5
    40
    14
    2
    87
    15
    2
    45


    This formula entered in E2:

    =LOOKUP(2,1/(A2:A15=D2),B2:B15)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    04-22-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Find last cell value in column A where column B value is "Some value"

    Thank you, works perfect. Even better as I realise with table object in 2007 I can just use the structured reference without having to bothered about an =offset dynamic range.

    =LOOKUP(2,1/(ACC1Table[[#All],[Acc Name]]=E2),ACC1Table[[#All],[ Balance]])

    Thanks again

  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: Find last cell value in column A where column B value is "Some value"

    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  2. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  3. [SOLVED] VBA Search to find value in "O" column under the condition that "S" column is blank
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2012, 10:15 AM
  4. [SOLVED] Delete row if cell in Column N equal "Different" or Column P equals "Blank"
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2012, 08:25 AM
  5. Replies: 11
    Last Post: 04-02-2009, 09:01 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