+ Reply to Thread
Results 1 to 13 of 13

If Function, Indirect & Vlookup to return based on two requirements

  1. #1
    Registered User
    Join Date
    04-20-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Exclamation If Function, Indirect & Vlookup to return based on two requirements

    Hello.

    I have attached an extract of the data and what I am trying to achieve.

    My current formula is:

    =(IF($B$2="Full-Year",SUMIF(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(A4,Lookups!AK:AL,2,0)),A4,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($A$2,Lookups!A:B,2,0))),SUMIFS(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($A$2,Lookups!A:B,2,0)),INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(A4,Lookups!AK:AL,2,0)),A4,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($B$2,Lookups!AF:AH,3,0)),VLOOKUP($B$2,Lookups!AF:AG,2,0))))/1000

    However it does not seem to be returning anything.

    Thank you

    Elouise
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: If Function, Indirect & Vlookup to return based on two requirements

    in your lookups for the range to sum, you are referencing column G which doesn't contain numbers!

    Hopefully that's a start

    Dav

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: If Function, Indirect & Vlookup to return based on two requirements

    I did get very lost trying to figure out what the formula was meant to be doing. This bit returns the correct values (much more simply) for the whole year.

    What do you want it to do for other than the whole year??

    =(IF(SUMIF('Current Forecast'!D:D,'Summary P&L'!A4,'Current Forecast'!J:J)=0,SUMIF('Current Forecast'!F:F,'Summary P&L'!A4,'Current Forecast'!J:J),SUMIF('Current Forecast'!D:D,'Summary P&L'!A4,'Current Forecast'!J:J)))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    04-20-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Thumbs up Re: If Function, Indirect & Vlookup to return based on two requirements

    Of course!

    I think this fixes the problem - thank you very much

  5. #5
    Registered User
    Join Date
    04-20-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Re: If Function, Indirect & Vlookup to return based on two requirements

    I would need it to follow what is in the drop down menu.

    I.e. I need it to pick up Jan, Feb, Mar, Q1 etc. all individually

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: If Function, Indirect & Vlookup to return based on two requirements

    You need to get data from J not G for "Total all Verticals" (in your Lookups B2): I haven't looked further as=t the rest of the formula.

    Also the division by 1000 is misplaced.
    Attached Files Attached Files

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: If Function, Indirect & Vlookup to return based on two requirements

    I did get very lost trying to figure out what the formula was meant to be doing.

    Is this anywhere close to your requirement?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-20-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Re: If Function, Indirect & Vlookup to return based on two requirements

    Hi,

    This is great - thank you.

    What I need now is to that it can be filtered on the vertical as well (i.e. A2)

    Not sure how to incorporate that into the formula?

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: If Function, Indirect & Vlookup to return based on two requirements

    Who are you talking to?

  10. #10
    Registered User
    Join Date
    04-20-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Re: If Function, Indirect & Vlookup to return based on two requirements

    This was directed to you, sorry!

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: If Function, Indirect & Vlookup to return based on two requirements

    Oh Pooh!! I was afraid it might have been. OK. Look back later. I fear that this might get a tad complicated!!

  12. #12
    Registered User
    Join Date
    04-20-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    14

    Re: If Function, Indirect & Vlookup to return based on two requirements

    No worries, I'm looking into how to combine these two formulas maybe?

    =(IF($S$2="Full-Year",SUMIF(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(R6,Lookups!AL:AM,2,0)),R6,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($R$2,Lookups!A:B,2,0))),SUMIFS(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($R$2,Lookups!A:B,2,0)),INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(R6,Lookups!AL:AM,2,0)),R6,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($S$2,Lookups!AG:AI,3,0)),VLOOKUP($S$2,Lookups!AG:AH,2,0)))

    AND(IF($R$2="Total All Verticals",SUMIF(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(R6,Lookups!AL:AM,2,0)),R6,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($R$2,Lookups!A:B,2,0))),SUMIFS(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($R$2,Lookups!A:B,2,0)),INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(R6,Lookups!AL:AM,2,0)),R6,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($S$2,Lookups!AG:AI,3,0)),VLOOKUP($S$2,Lookups!AG:AH,2,0))))/1000)

    Have you had any ideas?

    Thanks

    Elouise

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: If Function, Indirect & Vlookup to return based on two requirements

    As far as I can judge, the only difference is the division by 1000 on the second formula ?

    if so try ....


    =SUMIF(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(R6,Lookups!AL:AM,2,0)),R6,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($R$2,Lookups!A:B,2,0))),SUMIFS(INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($R$2,Lookups!A:B,2,0)),INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP(R6,Lookups!AL:AM,2,0)),R6,INDIRECT("'"&"Current Forecast"&"'!"&VLOOKUP($S$2,Lookups!AG:AI,3,0)),VLOOKUP($S$2,Lookups!AG:AH,2,0)))/(IF($R$2="Total all Verticals",1000,1)

+ 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. Help using index match function to lookup value based on requirements
    By satcess in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-22-2015, 09:13 PM
  2. COUNTIFS and INDIRECT function return #VALUE error - don't know why?
    By MikeRoot in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-26-2014, 02:37 PM
  3. Vlookup using Indirect and possibly Match, return most recent date
    By daivd_vachon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-28-2012, 04:12 AM
  4. Using Indirect function to return a named range.
    By adrianodl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 09:30 AM
  5. Replies: 5
    Last Post: 03-02-2012, 04:05 PM
  6. [SOLVED] Indirect or Vlookup Function
    By Justin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  7. [SOLVED] Indirect or Vlookup Function
    By Justin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

Tags for this Thread

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