I have to populate a cash-flow forecast, dependent on dates between the programme and a spend profile matching. Usually I would do this with SUMIF, using two rows for each element of the cost estimate (stacking the '1st' date of the month above the cost). However, I need to perform all of the calculations for this project in the same row. Is it possible?
I have tried to liberate solutions to similar queries (using SUMPRODUCT, OFFSET, INDEX etc), but I am never able to get the correct result. This may be due my lack of ability to doctor them, rather than these functions failing to provide the solution I need.
Ideally, I would like to formulate the following. "IF the date in every 5th column in the Spend Profile range matches the date in row 2 of the Programme range, SUM the value(s) in the cell(s) 2 columns prior".
The image below shows a very scaled down version of the data I have to work with. I have manually entered the expected results in the Programme range to illustrate the desired result. nb. CELLS G4 and L4 match S2, therefore E4 and J4 are returned.
Sample Data: Scaled down
You can make it work with SUMIFS with your sample data by offsetting the ranges like this
=SUMIFS($A4:$O4,$C2:$Q2,"1st",$C4:$Q4,S$2)
Related
I am trying to add values across sheets and an having a hard time finding a good formula to do this with.
I have over 300 sheets, representing rooms, that have two relevant columns, one that has dates and another with water consumption usage that look like this:
enter image description here
Issue is, the dates are inconsistent across all of the sheets. The full range of dates should be from 1/13/2023 to 2/6/2023 but many sheets are missing dates because water consumption wasn't read that date.
I have a summary page with a column representing the full range of dates and another column where I want to add usage for the specific date across all the sheets to show how much water was consumed that day across all rooms. Since the dates and usage are all in different cells, I can't call out specific cells. What is the best formula to use and how can I format it correctly?
I tried SUMIF formula's as well as IF formulas and tried nesting variations of them, but ultimately I am having trouble finding a formula/formatting that allows me to call out a cell value (ex, 2/6/2023) and sum the value two columns over. I am fairly new to the more advanced formula's so please forgive my ignorance.
I am puzzled by this problem.
I have a matrix with different criteria (shown below) which is to be used by users to access themselves, with each piece of criteria reflecting a maturity level. The criteria and the relevant maturity level is stored within a sheet called MasterSheetGrid.
The user selects the option that represents the criteria that they believe they are currently a like, in column J. Column K then performs the follow formula
=INDEX(MasterSheetGrid!$5:$5,MATCH((XLOOKUP($J8,$5:$5,8:8)),INDEX(MasterSheetGrid!$1:$50,((MATCH($C8,MasterSheetGrid!$C:$C,0))))))
This formula attempts to look at the user selection in column J, and calculates the criteria that their selection equates to. Then, using the criteria, the formula should look up the criteria within the MAsterSheetGrid and then return the corresponding level from row 5:5.
This formula works and does what i want it to, however, there are some instances where the formula does not work, when the look up/maturity criteria has a large amount of characters. I cannot work out how many characters this is, but the formula does not work if over a certain amount.
Note, i have attempted to replace the XLOOKUP with INDEXMATCH with no luck, i receive the same error. Also, the maturity criteria/user selection is calculated by the formula below
=IF($C8="","",(FILTER(INDEX(MasterSheetGrid!$D:$I,MATCH($C8,MasterSheetGrid!$C:$C,0),0),INDEX(MasterSheetGrid!$D:$I,MATCH($C8,MasterSheetGrid!$C:$C,0),0)<>"")))
MaturitySheetGrid
Formula works correctly due to a small character look up criteria
Formula does not work when the look up/selected criteria has a large amount of characters
Example of Product Data and Inbounds
I have 20 products that I sell that each have some requested amount that people want to buy. I am struggling to figure out a formula by which I could have it return the week where the sum of it and previous weeks is greater than the amount requested, so I know on what week of inbounds the order can be fulfilled.
The example data only shows three columns of dates but in reality there could be up to 20 weeks of inbounds inventory, so it would be potentially a large series of sums before it finds the one greater than the amount requested. In the example image the cells highlighted in green are the correct week for each product that I manually marked.
Thanks for the help, I'm not sure where to even start on this.
Assuming that your table start in cell A1 (therefore the cell C2 value is 96), use this formula for your conditional formatting starting from cell C2:
=AND(SUM($C2:C2)>=$B2,SUM($B2:B2)-$B2<$B2)
Warning: the formula might stop working if the overall structure of the table is changed. For example: if columns with non-numeric data are inserted, the user will need to re-apply the conditional formatting. If said inserted columns will contain numeric value that are not meant to be sum in the formula, it won't suffice anymore.
I am afraid I don't have time to write a full answer but the below might help. I am sure there is a way to avoid writing multiple COUNTIFS with a SUMPRODUCT but I haven't got there yet.
=SUM(1,
COUNTIFS($B3,">"&$C3),
COUNTIFS($B3,">" & SUM($C3:$D3)),
COUNTIFS($B3,">" & SUM($C3:$E3))
)
This is a model built around your having 20 weeks so that you can have one formula which doesn't require continuous adjustment - it does require one column of helper cells for each week, though:
the helper cells start in column Y, where the formula in Y2 is
=SUM($C2:C2)
which is then copied to the right as far as column AR, and then copied down, one row for each of your products.
With all of the helper cells populated, the array formula in W2 is
=IFNA(INDEX($C$1:$V$1,MATCH(1,N((Y2:AR2-B2)>0),0)),"In the future")
which is then copied down, one row for each of your products.
I'm trying to return a text value based on other text values matching AND a row's date falling in between another specified date range.
I'll try to create a simplified example of what I'm trying to achieve.
Let's say I have the following table breaking out produce units sold by day:
ProduceTable:
Now, let's say that I have another table detailing the discounts that I ran for items during certain date ranges:
ProducePromoTable:
[Edit: This example isn't great because the discount amounts are numerical, so ignore that and pretend that it's just text because that's what I'm really after. SUMIFS (I think) are off the table since I'm not trying to return a number value.]
What I would like to do is pull the discount amount into the first table based on whether the type of produce matches AND checking for whether there was a discounted price on that item on that particular day.
I've tried some lookup combinations and index-match, but I haven't quite cracked the code.
Anyone have any suggestions?
Assuming your other table is on a sheet named 'Discounts', then you can use this formula on cell D2 of the first table and copy down:
=IFERROR(INDEX(Discounts!$B$2:$B$6,MATCH(1,INDEX((Discounts!$A$2:$A$6=B2)*(Discounts!$C$2:$C$6<=A2)*(Discounts!$D$2:$D$6>=A2),),0)),"")
I would use the SUMPRODUCT function to find your values:
=IFERROR(INDEX($G$2:$G$5,SUMPRODUCT(($F$2:$F$5=B2)*($H$2:$H$5<=A2)*($I$2:$I$5>=A2)*ROW($G$2:$G$5))-1),"Not in Range")
I have a spreadsheet that provides monthly results for the last year. The layout is 7 columns per month, each column is the same information for each month (count and rate of various things).
I need to trigger a true/false based on both count and rate being above threshold values in any of the twelve months.
I can do this using either nested IFs or just a lot of IF statements, but was wondering if anyone has a better suggestion? I am open to formulas or VBA, whatever would be most robust.
Image of how each month is arranged
It's a little hard to tell from your spreadsheet what the layout is, but I tried to recreate it (See image below). I entered the function =IF(OR(B2>0.04,C2>2),$A$2) into cell A7 and dragged it across the spreadsheet. All the values you're looking for should be under the Month column. To prevent the function from changing its reference to the first column Name, I used absolute referencing, with dollar symbols $A$2. This way you don't have to keep changing it back to the specified column. Hope this helps.