+ Reply to Thread
Results 1 to 4 of 4

Sum cell dependant on Ratio with XLOOKUP and SUMIF

  1. #1
    Forum Contributor
    Join Date
    07-03-2019
    Location
    Victoria, Australia
    MS-Off Ver
    Office 365
    Posts
    126

    Sum cell dependant on Ratio with XLOOKUP and SUMIF

    Hi All,

    I am after your help with an issue I am having I am trying to sum cells in columns B12:T18 that is sum by a particular row in this case row B11:T11 this row has ratios in it eg: 1:1, 1:2, 1:3.

    So for instance the cell in B12 I want that cell to be if cell B1 = A23:A142 (2:3) then if true, Sum B23:B142 (2) multiply cell B2 divided by C23:C142 (3) in relation to the corresponding ratio.

    The ratios in cells B1:T1 won't always be the same.

    I have tried using the Xlookup with both the Sum and Sumif formulas and appears not to be working for me. I have attached a sample workbook as well

    Thanks
    Attached Files Attached Files

  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 2403
    Posts
    43,984

    Re: Sum cell dependant on Ratio with XLOOKUP and SUMIF

    I do not understand your expected answers, or your explanation. So at a guess:

    =IF(B2="","",B2*VLOOKUP(B$1,Table1,2,FALSE)/VLOOKUP(B$1,Table1,3,FALSE))

    copied across and dnown.
    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

  3. #3
    Forum Contributor
    Join Date
    07-03-2019
    Location
    Victoria, Australia
    MS-Off Ver
    Office 365
    Posts
    126

    Re: Sum cell dependant on Ratio with XLOOKUP and SUMIF

    Thanks for your help Glenn that has worked.

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: Sum cell dependant on Ratio with XLOOKUP and SUMIF

    As an alternative, this option does not require the ratio table at all. You can change the ratio row 11 (or row 1) to whatever you want and it should return the right value. Since I don't know the full use of your spreadsheet, I don't know if this is viable or not, but just thought I'd add as an alternative solution:

    =IF(B2="","",B2/RIGHT(B$11,LEN(B$11)-FIND(":",B$11))*LEFT(B$11,FIND(":",B$11)-1))

    (You can change the B$11 Reference to B$1 if that makes more sense.)

    Also, since you're using 365, you could use just 1 formula in 1 cell to get the whole grid (No need to copy down or across as it will SPILL into the other cells). In B12, enter:

    =IF(B2:T8="","",B2:T8/RIGHT(B$11:T$11,LEN(B$11:T$11)-FIND(":",B$11:T$11))*LEFT(B$11:T$11,FIND(":",B$11:T$11)-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. Xlookup - Tables and Referencing a cell
    By dennispaul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2020, 08:54 PM
  2. [SOLVED] Using xlookup/vlookup formula into a validated cell to return a value into that cell
    By Questray in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-14-2020, 11:51 AM
  3. Xlookup for first word in cell?
    By haskenazi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2020, 02:05 PM
  4. [SOLVED] finding average with date dependant and cell dependant
    By sfoll in forum Excel General
    Replies: 4
    Last Post: 08-24-2015, 04:58 AM
  5. [SOLVED] SUMIF dependant upon date range
    By colin.dickson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-17-2013, 10:13 AM
  6. Replies: 0
    Last Post: 01-27-2010, 05:47 PM
  7. [SOLVED] Divide x/y should give Ratio x:y,How to express ratio in excel
    By arvind3738 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-10-2006, 03:29 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