+ Reply to Thread
Results 1 to 7 of 7

[NEED HELP]Array Formula by Referring to Few Criteria in Different Table

  1. #1
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    Dear All,

    I need some help in putting the array Formula Referring to Few Criteria in Between 2 Tables in different sheet.
    Table 1 in "Raw Data" sheet while Table 2 in "Bill" sheet.

    Table 1 table2_2.png

    Table 2 table1_2.png

    In Table 1, Column "D", the formula is "=IF([@[ActualBilling (Month)]]>0,1,0)"

    In Table 2, Column "D", the formula is "=SUMIFS('Raw Data'!$E$5:$E$9028,'Raw Data'!$D$5:$D$9028,Bill!B57,'Raw Data'!$A$5:$A$9028,Bill!$E$4)"

    At Column "E57", currently my formula is "{=MAX(IF(AND($D57=0,Billing__Stage=$E$4,Creteria=$B57),'Raw Data'!$B5,'Raw Data'!$C5:$C12))}"

    and at column "E57" there are some conditional formatting where to change the cell colour to Green, Blue, or White when cell Column E=8, E<8, E=0.


    My issues is current array formula i used i need to manually identify the range of cell in Table 1, ActualBilling column for unit A-3-A to A-3-H, is there any other method which allow me to select the overall range in ActualBilling column, they will select the relevant range and calculate it. And i can copy and paste this formula to other cell.

    Thank you.
    Attached Files Attached Files

  2. #2
    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
    30,887

    Re: [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    in E57

    =MAX(IF(AND($D57=0,Billing__Stage=$E$4,Creteria=$B57),'Raw Data'!$B5,OFFSET('Raw Data'!$C$1,MATCH($E$4&B57,'Raw Data'!A:A&'Raw Data'!D:D,0)-1,,COUNTIFS('Raw Data'!A:A,$E$4,'Raw Data'!D:D,$B57))))

    Enter with Ctrl+Shift+Enter

    You should change full columns e.g. A:A to sensible maximum e.g A1:A5000

    I don't know how you differentiate between Tower A and Tower B but you should able to adapt the above.

    Hope this helps
    Last edited by JohnTopley; 01-27-2016 at 04:05 AM.

  3. #3
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    146

    Re: [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    Hi,

    Can be solved by changing the formula to this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This changed formula will create a range by using the condition billing_stage and tower. Because you've used merge field for the billing stage, make sure you enter the correct cell for billing stage and tower.

  4. #4
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    Re: [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    Quote Originally Posted by JohnTopley View Post
    in E57

    =MAX(IF(AND($D57=0,Billing__Stage=$E$4,Creteria=$B57),'Raw Data'!$B5,OFFSET('Raw Data'!$C$1,MATCH($E$4&B57,'Raw Data'!A:A&'Raw Data'!D:D,0)-1,,COUNTIFS('Raw Data'!A:A,$E$4,'Raw Data'!D:D,$B57))))

    Enter with Ctrl+Shift+Enter

    You should change full columns e.g. A:A to sensible maximum e.g A1:A5000

    I don't know how you differentiate between Tower A and Tower B but you should able to adapt the above.

    Hope this helps
    Thanks for your prompt reply.
    However, do you mind to explain what is the purpose of 'Raw Data'!$C$1 in offset formula?

    Also, when i copy this formula to E56, E55, E54 and so on, it show the same answer as E57. Any solution?
    Last edited by ulala2; 01-27-2016 at 07:11 AM.

  5. #5
    Registered User
    Join Date
    08-04-2015
    Location
    Malaysia
    MS-Off Ver
    Microsoft Office 365
    Posts
    57

    Re: [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    Quote Originally Posted by joris moerings View Post
    Hi,

    Can be solved by changing the formula to this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This changed formula will create a range by using the condition billing_stage and tower. Because you've used merge field for the billing stage, make sure you enter the correct cell for billing stage and tower.
    Trying this in cell E57, and get the answer, however, when apply this to other cell, E56, E55, E54 and so on, it show the same answer as E57. Any solution?

  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
    30,887

    Re: [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    $C$1 is the "Anchor" (starting point) of the offset function. Everything is relative to this cell - Start rows for example.

    You cannot simple copy the formulas: you need to change the Criteria cells e.g $E$4 is "2a" so need to change to cell which contains "2b" etc.

    Also as I said in my earlier post, I couldn't determine Tower A data from Tower B.

    Changing the criteria also applies to posting by Joris

  7. #7
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    146

    Re: [NEED HELP]Array Formula by Referring to Few Criteria in Different Table

    The formula is still an array formula that part hasn't changed. So it still needs to be eneterd with CTRL+Shift+Enter

+ 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. How do I use an absolute reference in a formula when referring to a table
    By quantumag in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-17-2014, 02:01 PM
  2. [SOLVED] Referring at an Array in different worksheet
    By Holbeck_Ghyll in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-05-2014, 10:42 AM
  3. Array formula + Array formula with criteria that lookups a Table
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2013, 11:41 AM
  4. Array formula to return a table excluding rows meeting a certain criteria
    By puckman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2013, 07:54 AM
  5. Typing an array into a formula rather than referring to an array of cells
    By Cookstein2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2013, 12:59 PM
  6. [SOLVED] Array Formula to Lookup and Return All Rows in Table that Meet Single Criteria
    By Torkel74 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2013, 10:41 PM
  7. Formula update needed by referring to another table
    By Deenah in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-07-2011, 01:11 PM

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