+ Reply to Thread
Results 1 to 14 of 14

Formula for results depending on many conditions from few Sheets

  1. #1
    Registered User
    Join Date
    12-30-2016
    Location
    Edinburgh, UK
    MS-Off Ver
    2013
    Posts
    29

    Formula for results depending on many conditions from few Sheets

    Morning everyone,

    It would like to create a spreadsheet to show results that matched 3 conditions but from different sheets depending on choice from drop down menu (B1, B2, B3 - Home sheet).

    And now I want to show results using drop down menu for site (which would get conditions from sheets accordingly), electricity and cost for year 2014-15 in cells E3 to P4 in sheet HOME if that makes any sense :/
    Attached Files Attached Files
    Last edited by Scavenger102; 12-30-2016 at 05:45 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    It would be very helpful if you could provide the following:

    1. Any formulae you have tried and failed to get working.
    2. Some sample expected outcomes (entered manually) in your sample workbook.

    Thanks!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-30-2016
    Location
    Edinburgh, UK
    MS-Off Ver
    2013
    Posts
    29

    Re: Formula for results depending on many conditions from few Sheets

    Formula I tried was based on vlookup. I used vookup when I was having when I had one condition form only one sheet. But here I have to bring data from the site I choose (i.e. site 1, site 2 etc) so I wanted to combine this with function Indirect... Many tries and it is not working... The last one I tried was:
    E3: {=INDIRECT("'"&B1&"'!",VLOOKUP($B$2&B3&B4,$A$1:$O$100,10,FALSE))}

    The results I want to get values from Site 1 in (this example) all values from whole year 2014-15

    Screen Shot 2016-12-30 at 09.57.57 (3).png

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    Sorry to be a pain, but please would you add those expected outcomes to your sample workbook (manually) and then I'll take a look for you. I don't have time to copy them in myself - sorry.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    Sorry to be a pain, but please would you add those expected outcomes to your sample workbook (manually) and then I'll take a look for you. I don't have time to copy them in myself - sorry.

  6. #6
    Registered User
    Join Date
    12-30-2016
    Location
    Edinburgh, UK
    MS-Off Ver
    2013
    Posts
    29

    Re: Formula for results depending on many conditions from few Sheets

    Screen Shot 2016-12-30 at 10.10.39 (3).png

    The idea is to create a chart that would compare utility and cost for a year chosen and for site chosen

    So in this example I have chosen from drop down menu - Site 1 & 2014-15 & Electricity - all the values taken from sheet Site 1

    Screen Shot 2016-12-30 at 10.46.41 (2).png

    But if I chose Site 2 I would like to get all these values from Site 2 sheet

    Many thank

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    Images are of no use to me. I do NOT have time to copy data from them into your sample file - sorry.

    PLEASE add some expected outcomes to your sample file and attach that workbook here. Charts can come later: let's not try to run until we have started walking!

    Thanks.

  8. #8
    Registered User
    Join Date
    12-30-2016
    Location
    Edinburgh, UK
    MS-Off Ver
    2013
    Posts
    29

    Re: Formula for results depending on many conditions from few Sheets

    Thanks Ali for all your help

    Here is a the file:
    Attached Files Attached Files

  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: Formula for results depending on many conditions from few Sheets

    You'll need to use an array formula like this one:

    =INDEX(INDIRECT("'"&$B$1&"'!$D$1:$O$32"),MATCH(1,(INDIRECT("'"&$B$1&"'!$A$1:$A$32")=Home!$B$2)*(INDIRECT("'"&$B$1&"'!$B$1:$B$32")=Home!$B$3),0),MATCH(Home!E$2,INDIRECT("'"&$B$1&"'!$D$2:$O$2"),0))


    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    Tbhis may not fully answer your Q, as I just spotted your new sheet. However, do take a look at htis. I have dummy data for site 1 and 2.
    Attached Files Attached Files
    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

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    We can do it without array formulae. Use the following copied across:

    In E3: =INDEX(INDIRECT("'"&$B$1&"'!$A$1:$O$500"),MATCH(Home!$B$2,'Site 1'!$A$1:$A$500,0)+LOOKUP($B$3,{"Electricity","Gas","Water"},{2,4,6}),COLUMN()-1)

    In E4: =INDEX(INDIRECT("'"&$B$1&"'!$A$1:$O$500"),MATCH(Home!$B$2,'Site 1'!$A$1:$A$500,0)+LOOKUP($B3,{"Electricity","Gas","Water"},{3,5,7}),COLUMN()-1)

    In E9: =INDEX(INDIRECT("'"&$B$1&"'!$A$1:$O$500"),MATCH(Home!$B$8,'Site 1'!$A$1:$A$500,0)+LOOKUP($B$3,{"Electricity","Gas","Water"},{2,4,6}),COLUMN()-1)

    In E10: =INDEX(INDIRECT("'"&$B$1&"'!$A$1:$O$500"),MATCH(Home!$B$8,'Site 1'!$A$1:$A$500,0)+LOOKUP($B9,{"Electricity","Gas","Water"},{3,5,7}),COLUMN()-1)

  11. #11
    Registered User
    Join Date
    12-30-2016
    Location
    Edinburgh, UK
    MS-Off Ver
    2013
    Posts
    29

    Re: Formula for results depending on many conditions from few Sheets

    That is brilliant, thanks

    I will check both

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    You're welcome!

    Mine depends on the layout of the site sheets being identical and every year to be listed in column A of those sheets.

  13. #13
    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: Formula for results depending on many conditions from few Sheets

    Tweaked to add on the 2nd row...
    Attached Files Attached Files

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Formula for results depending on many conditions from few Sheets

    Thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. formula search results according to certain conditions
    By gams_full in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-31-2016, 01:52 AM
  2. Replies: 1
    Last Post: 09-02-2014, 03:22 PM
  3. Need Conditional Formula to Average the Data Depending on 2 Conditions
    By Snakehips in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2013, 04:37 PM
  4. Need formula to pull data depending on multiple conditions
    By shabby in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2013, 02:58 PM
  5. Replies: 4
    Last Post: 11-13-2012, 09:13 AM
  6. one formula wiht multiple conditions and results..
    By Pavan Shetty in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-13-2012, 04:48 AM
  7. Replies: 5
    Last Post: 08-26-2009, 10:21 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