+ Reply to Thread
Results 1 to 8 of 8

Looking to create formula to pull data based on multiple criteria and more

  1. #1
    Registered User
    Join Date
    10-25-2022
    Location
    New York, NY
    MS-Off Ver
    Office 365
    Posts
    17

    Looking to create formula to pull data based on multiple criteria and more

    Hello!

    If you will so kindly view my data set, I am trying to populate tab 1 with data from tab 2. I would like to be able to pull in Usage data (Tab 2, Col K) into tab 1 based on Building Code (Tab 2, Col B), Service Type (Tab 2, Col E) and Statement Date (Tab 2, Col H). The goal is to populate Tab 1 with this data so it can be update automatically by just uploading new underlying data and no manual editing necessary.

    More info: -For Service Type, I only want "EL" code to be included in the calculation, any other codes should be ignored by the formula.
    -I am trying to build this template by Building Code so only data relevant to one specific building should be being pulled (the example data set has 3 different building codes)
    -I have totaled what the correct usage amount should be that the formula should populate in Tab 1, Cell G12 to try and help clarify a little and also give a check to know if the formula is correct.

    Finally, I would like to add in a function using Data Validation or another method if it is easier to create a dropdown menu by Building Code (Tab 2, Col B) in Tab 1 so I can change between different buildings and have all the data change relevant to each building.

    I know there is a lot here and if anything is unclear or I left anything out that is necessary to try and do this I apologize in advance. I have been trying to make something work on this for days and am just stuck so any help at all would be appreciated. Thanks so much for taking the time to help!

    Sincerely,
    BoneyLit

    Excel Help 2.xlsx

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

    Re: Looking to create formula to pull data based on multiple criteria and more

    E12, copied down:
    =SUMPRODUCT((Sheet2!$B$2:$B$149=$C$4)*(TEXT(Sheet2!$F$2:$F$149,"mmmmyyyy")=$C12&E$10)*(ISNUMBER(SEARCH("EL",Sheet2!$E$2:$E$149)))*Sheet2!$I$2:$I$149)

    then copy/paste to 2021 & 2022. I do not know what you want in columns M and O.
    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

  3. #3
    Registered User
    Join Date
    10-25-2022
    Location
    New York, NY
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Looking to create formula to pull data based on multiple criteria and more

    Hi Glenn,

    Thanks for the quick response! The file you attached was blank so not sure if you accidentally uploaded the wrong one or something. I tried the formula on my own and was having some issues so if you could please upload the file with your formula it would be much appreciated. Thanks!

    Also, Columns M and O can be left blank for now. Appreciate it!!

    Sincerely,
    BoneyLit

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

    Re: Looking to create formula to pull data based on multiple criteria and more

    Oops. Back in 90 mins. Try putting beta5 in c4... or another building code.

  5. #5
    Registered User
    Join Date
    10-25-2022
    Location
    New York, NY
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Looking to create formula to pull data based on multiple criteria and more

    No worries! I noticed C4 was empty and got it to populate but I thought it wasn't pulling the correct data but it is.

    If you could also help with setting up data validation or whatever function allows me to create a drop down and change between Building Codes and have the template automatically populate accordingly, that would be wonderful. Appreciate all of your help!

    Sincerely,
    BoneyLit

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

    Re: Looking to create formula to pull data based on multiple criteria and more

    In AB2 (or elsewhere)...

    =SORT(UNIQUE(FILTER(Sheet2!B2:B1000,Sheet2!B2:B1000<>"")))

    then in c4 Data/DataValidation/List
    =AB2#
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-25-2022
    Location
    New York, NY
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Looking to create formula to pull data based on multiple criteria and more

    Hi Glenn,

    Thanks for this! I'm running into one more issue that I did not anticipate. For the "SEARCH("EL" part of the formula, is it possible to change it search for EL+#, i.e. EL1, EL2, etc. I ask because what I forgot to mention before is in my actual data set there are text next to these codes and some of the non-EL codes have words with "EL" in them (See Sheet 2, BETA11) so it is pulling in extra data into the formula that shouldn't be included. Could you help with this edit please? Thanks!

    Sincerely,
    BoneyLit

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

    Re: Looking to create formula to pull data based on multiple criteria and more

    Try it now.
    Attached Files Attached Files

+ 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. Need Efficient Formula to pull YTD data based on Multiple Criteria
    By hchavous in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2022, 09:21 AM
  2. Pull data from multiple columns based on criteria
    By Chris Bread in forum Excel General
    Replies: 9
    Last Post: 06-01-2022, 06:57 AM
  3. Data pull based on multiple criteria
    By LordBlissett in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-16-2022, 01:34 PM
  4. I need to pull specific data based on multiple criteria
    By rseckler in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-25-2020, 02:28 PM
  5. [SOLVED] Data Pull from Multiple Worksheets based on Criteria!!!
    By Rajeshkumar R in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2017, 07:10 AM
  6. [SOLVED] Pull data from a table based on multiple criteria - old formula trying to use AND
    By tweaver in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-12-2016, 04:37 PM
  7. [SOLVED] Pull data from one sheet to another based on multiple criteria
    By thestalkycop in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2014, 01:38 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