+ Reply to Thread
Results 1 to 3 of 3

Indirect + Lookup last value

  1. #1
    Registered User
    Join Date
    03-24-2007
    Posts
    1

    Indirect + Lookup last value

    Dear all,

    I am using a formula that indexes and matches from another sheet (2006). It retrieves all the latest values.

    =INDEX('2006'!B9:B375,MATCH(9.99999999999999E+307,'2006'!B9:B375))

    However, I have created lots of different sheets with years and the only way I have found to update this formula is to manually change it from, say, '2007','2008' etc. I want this to be dependant on the year, however, e.g. YEAR().

    I can't seem to add a reference to a cell with a year though. Would anyone be kind enough to give me some advice?

    Regards,
    Robin
    Last edited by slyzenoui; 03-24-2007 at 03:46 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please read forum rules below and then change your title

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you have a cell with the year in it, e.g. A1, then you can use INDIRECT to reference that cell, i.e.

    =INDEX(INDIRECT(A1&"!B9:B375"),MATCH(9.99999999999999E+307,INDIRECT(A1&"!B9:B375")))

    You could also simplify this specific formula to

    =LOOKUP(9.99999999999999E+307,INDIRECT(A1& "!B9:B375"))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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