VLOOKUP & COUNTIF - excel

I'm looking for some help on trying to combine functions.
I think I need VLOOKUP & COUNTIF.
I have Sheet 1 with a list of clients, column A, I then have 12 other tabs Jan-Dec same table format on each, client listed in column C.
On sheet 1, I want to count from every month tab how many times listed (invoices sent)
Not every client in the list will appear on the month invoice tabs , others more than once.
Please see screenshot attached
Any advice would be appreciated.
Thank you
Amy

You only need CountIf. Just reference the client on Sheet 1:-
=countif(January!C3:C100, Sheet1!A3). Copy this down to reference the client on each row.
You could also consider the following for a better working and easier spreadsheet:-
-Define ranges and reference those instead
-Copy all your monthly data with the year into one sheet. Have a column for month and year then just autofilter to get the month you want - using countif to also reference the month and year if you just want a particular one in question
You'll find it easier to grown your spreadsheet and build formulae if your data is tidy and less dispersed.
Hope this helps,
Phil

Related

SUM values in range with same week & year in Excel

Have an excel sheet with hours | week | year in A:C and I would like to calculate "weekly hours" in column D.
For each unique Week & Year combination the number of hours will be displayed.
What I tried so far
I set up unique combination of year&week and then tried to IF(F2=Unique,SUM(A:A),"false") but this just added entire hours and not only hours that were equal to the unique value.
Some similar but different questions & answers appear on StackOverflow. This one sums all data = monday
=SUMPRODUCT((WEEKDAY(A1:A8)=2)*B1:B8)
I couldnt really find anything where output was going to be written into each of the cells in a column as I need.
Possible answer
I think a query that sums values could work, but I am not sure. Appreciate any help.
Again a shared excel sheet on microsoft 360 is also available here.
Use SUMIFS():
=SUMIFS(A:A,B:B,B2,C:C,C2)
Then copy that formula down.
Or with office 365 we can do the range and it will spill:
=SUMIFS(A:A,B:B,B2:B14,C:C,C2:C14)

EXCEL Online - Pull entire column of data where condition (without VBA)

trying to figure out how to summarise some data quickly.
I have here an example of what I am trying to do in the attached picture.
Basically - I have a yearly planner with some names, and on various dates there's a X marking that person on that date.
I need to be able to summarise on either the bottom or a new sheet, the total days as a list of days where there's a mark. The data also needs to be presented in the same format - with all names shown even if there's a blank in that days cell.
I can't use VBA because I'm forced to use EXCEL online unfortunately.
I basically want (from a coders perspective) select column where column not null.
Can anyone help me understand how I would do this please? If not I'll have to manually go through and pull out the columns on a weekly basis
Thanks!
Example
It took a few hours to build a solution.
https://1drv.ms/x/s!AncAhUkdErOkgqRwUEztHeWbj3LkqA?e=s4x0SI
A3 =IF(COUNTIF(C3:L3;"x")>0;ROW();"")
C1 =IF(COUNTIF(C3:C12;"x")>0;COLUMN();"")
B17 =IFERROR(INDEX($B$3:$B$12;MATCH(SMALL($A$3:$A$12;ROWS($A$3:A3));$A$3:$A$12;0));"")
C16 =IF(IFERROR(SMALL($C$1:$L$1;COLUMNS($C$1:C1));"")<>"";HLOOKUP(IFERROR(SMALL($C$1:$L$1;COLUMNS($C$1:C1));"");$C$1:$L$2;2);"")
C17 =IF(IFNA(INDEX($C$3:$L$12;MATCH($B17;$B$3:$B$12;0);MATCH(C$16;$C$2:$L$2;0));"")=0;"";IFNA(INDEX($C$3:$L$12;MATCH($B17;$B$3:$B$12;0);MATCH(C$16;$C$2:$L$2;0));""))

Filtering or Importing data for specific date

I was wondering if anyone knows if it's possible to import a data, in a sort of a COUNTIF function but only for the data dated today?
I have 2 sheets, Attendance and Department.
In the Department tab, I have a list of employee's in column A. In column B and so on, I have a drop down option to select which department they're are stationed for each day. Each column represent a day, B being the 1st, C being 2nd, ... and so on. The header for each column has the day for the day as well.
On the attendance sheet, I have the list of Department in column A and in B, it is used to record how many employee are stationed at that department. I also have the day for the day on this sheet on A1.
Is it possible that when I change the date, the number of employee stationed in each department will change according to the date?
Is it possible to do this with just functions?
I've tried using the COUNTIF function, but I've found that I will have to change the range on a daily basis.
Use The Function: in B4 of Attendance Tab
=COUNTIF(INDIRECT("Department!" &ADDRESS(3,MATCH($A$1,Department!$A$2:$P$2,0)) & ":" &ADDRESS(6,MATCH($A$1,Department!$A$2:$P$2,0))),$A4)
Results: Attendance Tab
Department Tab:
I have used all the references as in the screenshots, you can change them if they are different in your sheet.
your question can be solved by SUMPRODUCT function. See below solution picture:
SOLUTION
Just to quickly explain my solution, I gave a name to the date on the Department sheet, called it 'Date_Lookup'; and I gave a name to the dates on the Attendance sheet, called it 'Date_List'. Names will simplify my formula especially when referencing across worksheets.
You will eventually find a lot of COUNIF scenario can be solved by SUMPRODUCT and this is just one example. SUMPRODUCT can do a lot IFs than COUNTIFS can do. In your case there are two criteria, one is which department did an employee attend to, and the other is on which date did the employee attend to that particular department. So my SUMPRODUCT formula can be understood as:
=SUMPRODUCT(('from the list of dates'='the particular date I want to see')*('from the full attendance record'='how many employees went to the given department'))
Let me know if you have difficulties understand my answer. A good 1 hour read through some online articles regarding SUMPRODUCT will help.
Cheers :)
Your first step would be to use a function to work out in which column the entered date appears. So in your Department sheet you enter a date in A1, then set B1 to:
=IFERROR(MATCH(A1, Attendance!2:2, 0), 0)
I use the IFERROR as I don't like seeing errors on my sheet. Assuming the result isn't zero, use a COUNTIF looking for the department letter in a range in the result column. I'd simply use on OFFSET to get the right range, but sticklers would tell you to find a different way of doing it. So long as your spreadsheet isn't going to increase in size to a massive complexity, OFFSET is fine.

Guide me Regarding Compare the Value of Cell contain date and other cell contain Drop down list

Hy Every One, I need help in excel formula, I have two sheets, sheet1 for sale tracker, sheet two for goals tracker, I used Now() to enter date automatically, and its working fine, Next in goal sheet, I use =Sumif() to calcualte various category totals and refer them in cell. Its also working fine. But I want to track record according to month and category. Like I have 6 categories detail is as under,
Sales Tracker
In the First picture Column Date consist of formula "=IF(ISBLANK(B5),"-",TODAY())" and it display the name of month like "October"
While in second picture there is a drop down list of "Month" Column.
1- I want to use if statement like =if(Date=Month, Sum(Revenue Secure column Data), "-") But its not working the formula I wrote here is an example....
2- I want when I select any month from second sheet like January, February, It should calculate sum from picutre one data and only show the sum of january etc.
Please help me, this is eating my brain a huge,,,,,,:)
Thanks in advance....
In short my question is how can I use If statement to compare value of cell that contain formula and other that contain drop down list?
Or use the MONTH function to change your date to a number 1 to 12 corresponding to the month. Then have the combo return a number for the month chosen. It might be faster using integers than test
I Believe you have to compare the month and not the whole date.
You can do TEXT(NOW();"mmmm") to get the full month name of the current data (in the language of excel) and then compare it to your drop down.
If you replace the NOW() with any data it works as well.

Excel - sum numbers in each cell, that matches the pattern

I have a table for capacity management, that contains information about teams working on project in time. I would like to be able to create a new table, that would basically tell me, which team is overloaded. I guess example would explain it better:
Here is simplified table 1
The number indicates how many resources is needed from the team on given day
Here is the second table, that I need
The numbers in columns is sum of all numbers for the team for the specific day across all projects.
Is this somehow possible? Thanks for any advice!
Create a summary table with the dates in the column headers and the team names in the row headers. Then you can use a SumProduct() formula to calculate the totals per team and date. Refer to the screenshot below.
The formula in cell B13 is
=SUMPRODUCT(($B$1:$H$1=B$12)*($A$2:$A$8=$A13)*$B$2:$H$8)
Copy across and down. The summary table can be on a different sheet. Just make sure that you get the references right and pay attention to the placements of the $ signs.

Resources