So I'm trying to count data over a large date range, lets say I only need May's data and only the data in May that has a field with a specific entry, I know I need to use COUNTA as the entry are words, but how would I organize the formula? IF (date matches range) then COUNTA IF (cell "X" = Yes) is the best I can come up with as the layout, any help would be appreciated!
Use =COUNTIFS(...). It allows you to use multiple sets of criteria.
For example, you could use something like this
=COUNTIFS(A1:A40,"Yes", B1:B40, ">"&C1)
It would tell you the number of fields with text "Yes" in A1:A40 that have a date in column B greater than the value of C1
You can use COUNTIF as per the screenshot below. This will give you the number of 'May' entries in Column A:
In case you need to find another data in some other columns based upon the condition in column A then it would be a different solution. You will need to explain the problem a bit more clearly with some sample data.
Hope this helps!
Use the following:
=COUNTIFS(Sheet2!$A$2:$A$5000,">="&DATE(2017,5,1),Sheet2!$A$2:$A$5000,"<="&DATE(2017,5,31),Sheet2!$B$2:$B$5000,"<>")
change A2:A5000 to your date column
B2:B5000 to your project column
instead of "<>" write the condition for project
Related
(Pictures included) -
I'm trying to write a formula that sums the Forecast Qty (dynamic range) based on multiple criteria. The criteria I want to base it on is the Part number and the month (Aug-21, Sep-21 etc). Each part can have multiple forecasts for each month, I've ran a match formula that shows the first row in which each part changes, but am not sure how to necessarily break it down further into months.
The previous pictures will give more insight into what I want. The first picture shows my raw data and the Match function I performed to find the first row of corresponding part. The second picture shows where I'd like the end result. The '100' in the selected cell is the result of the formula I have ran below.
=IF(VLOOKUP(F2,HIghJump!B:F,4,FALSE)>DATEVALUE("9/01/2021"),SUM(HIghJump!F2:F6))
My issue is how do I get the range in the sum formula (F2:F6), to change based on corresponding month. Beyond that, how do I get this formula to change based on different parts and different numbers of forecasts per month.
Any help is greatly appreciated!
Use SUMIFS:
=SUMIFS(HIghJump!$F:$F,HIghJump!$B:$B,$F2,HIghJump!$E:$E,">="&EOMONTH(K$1,-1)+1,HIghJump!$E:$E,"<"&EOMONTH(K$1,0)+1)
This should go in L2 and copy down. Change the K$1 to each corresponding target date when moving over columns.
If I am understanding correctly and if you have the newest version of Excel, then FILTER will come in handy.
Try:
=SUM(FILTER(HIghJump!F:F,
(HIghJump!B:B=$F2)*(HIghJump!B:B>=K$1)*(HIghJump!B:B<EOMONTH(K$1,0)+1))
Note that it is generally considered best practice to use partial ranges (e.g. $B$1:$F$100 and $B$1:$B$100 instead of B:F and B:B), so that might be something you would want to consider if performance is of importance to you. Also make sure your sheet name is really "HIghJump" instead of "High Jump" or some variation.
Answer:
Had to create a column using MONTH(x), then base SUMIFS off that vs the original month column.
=SUMIFS(HIghJump!F:F,HIghJump!H:H,MONTH(K$1),HIghJump!B:B,F2)
First, I know that DSUM and SUMIF works with the values in the entire cell. I would like to know if I can add values of cells where part of the string contains a particular text.
Let me explain. I use Google Sheets to manage my expenses, and gather data about my financials. I have something like this—
As you can see, above is a typical example of a day. Each cell has a category, and a description, and below it, the value in the next row. Now is it possible to add values of the cell containing the word "TAXIS"? This way I should be able to get a sum of expenses for a particular category.
I've tried a vast number of expense managers, but none that I am happy with. Finally have decided to go the manual route, and here I am. Any help would be appreciated. Thanks in advance!
You can use wild card to add part of string. Suppose you data starts from C2 cell and data goes like your screenshot then you can use following formula.
=SUMIF(C2:K2,"*TAXIS*",C3:K3)
Obviously you have to customize formula based on your sheet from where data starts and ends.
I have two lists, the first is a set of users. The second list contains different encounter dates for these users.
I need to identify the date that is within 10 days of the "Renew Date" [Column C], but not before. With Member 1 this would be row 3 1/8/2017. With Member 2 this would be row 6, 1/21/2017.
Now using a VLOOKUP which the user before me who managed this spreadsheet obviously isn't viable as it's simply going to pickup the first date that has a matching Member ID. Is there a way to do this in Excel at all?
I have included a link to a sample file and a screenshoit of the sample data.
https://drive.google.com/file/d/0B5kjsJZFrUgFcUFTNFBzQzN4cm8/view?usp=sharing
To avoid the slowness and complexities of array formulas, you can try with SUMIFS but the problem is that if you have more than one match, it will add them, not return the first match. The sum will look like an aberration. Will work however if you are guaranateed that you have only one match in the data.
An alternative is also to use AVERAGEIFS, which, in case of multiple matches, will give you their average and it will look like a valid date and a good result. Enter this formula in D2 and fill down the column:
D2:
=AVERAGEIFS(G:G,F:F,A2,G:G,">="&C2,G:G,"<="&C2+10)
and don't forget to format column D as Date.
Try this
=SUMPRODUCT($G$2:$G$7,--($F$2:$F$7=A2),--($G$2:$G$7<=C2+10),--($G$2:$G$7>C2))
Format the result as date. See screenshot (my system uses DMY order)
Don't use whole column references with this formula. It will slow down the workbook.
I have a data range B5:L100.
In column B is a string identifier, say 'X' or 'Y'.
In columns C:L we have different people's names entered (never more than once per row).
I want to count how many times a person's name appears in rows where column B is 'X'. The following formula doesn't work (using "Max" as the example person to search for).
Can you advise on what will do this elegantly?
=COUNTIFS(C5:L100,"Max",B5:B100,"X")
I think an array formula might be in order, but I'm not too experienced on those.
One way to do this is to just do it column by column:
=COUNTIFS(C5:C100,"Max",B5:B100,"X")+COUNTIFS(D5:D100,"Max",B5:B100,"X")... etc
Does the trick, but not too elegant if you have loads of columns to look through. I'm sure there's a tidier way using an array formula.
=SUMPRODUCT((C5:L100="Max")*(B5:B100="X"))
With a column range of A1:A20 I have found the largest number with =MAX(A1:A20). How can I find the reference (e.g. A5) of the MAX() result?
I'm specifically using Google Spreadsheets but hope this is simple enough to be standard across excel and Google Spreadsheets.
=MATCH(MAX(A1:A120),A1:A120,0)
The problem is if you get more than one match: it will only give you the first one.
Either :
=ADDRESS(MATCH(MAX($A:$A),$A:$A,0),1)
if you know it's going to be in column A (1)
Or:
=CELL("address",INDEX($A:$A,MATCH(MAX($A:$A),$A:$A,0)))
And yes, it only gives you the first match
You can use something on the lines of the following
=MATCH(MAX(E7:E9),E7:E9)
This will give you the offset from the formula to the biggest number. If you use this in conjunction with ADDRESS you could get the actual cell. However, using offset should probably help you get there if you want to do something on that cell, or another number in the same row as that cell
As of now, there is a QUERY formula that can help with this situation
=ARRAYFORMULA(query({ROW(A2:A), A2:A},
"SELECT MAX(Col1)
WHERE Col2 IS NOT NULL
ORDER BY Col2 DESC"))
ROW(A2:A) represents the row number of each row which you can use the result with ADDRESS to create a reference to a cell.