Excel Advanced Filtering Issues - Advice Needed - excel

So basically I have a main table, and I want to filter that data to another table (normally easy) but I want this based upon 2 criteria. e.g. I want to filter the data of a specific department but only for the current month. The way I display the current month in the main table is by inserting the date from a userform and then by formatting that cell to just display the month. However, when using advanced filter I use the column headings that I want to filter e.g. department: mens, month: november (worked out using =now() then formatting to just display the month) but when I'm running the filter it's not picking out the information at all.
I think this lies with the way the month is worked out and displayed but I can't figure out another way to do this. Any help is greatly appreciated.
I'm also open to trying a new method of just selecting data for the current month if anyone has a cleaner way, as I'm sure there is one.

You have to use a formula in your criteria to specify what month you want to extract. But it's not terribly intuitive. Take a look at this sample. My starting list is the range A1:B7. My criteria is in range D1:E2. The Department is straightforward; I just entered "3". (Obviously, without the quotes.) But instead of a Month criteria, I added "GetMonth" and entered the formula shown in the formula bar. You can name this whatever you want, but it can't be the same as one of the headers in your source list. (Yeah, I checked.) The formula checks to see if the current month of the date in cell B2 is 12, which is December, and returns TRUE or FALSE. You could use 11 for November. The advanced filter will apply the reference to cell B2 that's in the formula in a relative fashion to all cells in the Month column. And Viola! my output in range A10:B11 is what you'd expect it to be.

Related

Existing array formula, need to add date restriction

I have been tailoring an excel sheet for budget analysis using a pivot table.
Works quite well actually!
One of the fields I have above the table is a reporting of the 1st, 2nd and (depending on the schedule the 3rd) pay check in a month.
Right now I am using this formula:
1st
=INDEX(bk_download!$D$2:$D$200, SMALL(IF(bk_download!$B$2:$B$200="DFAS-CLEVELAND FED SALARY ***********xxxx", ROW(bk_download!$B$2:$B$200)-ROW(INDEX(bk_download!$B$2:$B$200,1,1))+1),1))
2nd
=INDEX(bk_download!$D$2:$D$200, SMALL(IF(bk_download!$B$2:$B$200="DFAS-CLEVELAND FED SALARY ***********xxxx", ROW(bk_download!$B$2:$B$200)-ROW(INDEX(bk_download!$B$2:$B$200,1,1))+1),2))
3rd
=INDEX(bk_download!$D$2:$D$200, SMALL(IF(bk_download!$B$2:$B$200="DFAS-CLEVELAND FED SALARY ***********xxxx", ROW(bk_download!$B$2:$B$200)-ROW(INDEX(bk_download!$B$2:$B$200,1,1))+1),3))
As you can see in the formula, it's referencing another sheet in the file. What I am trying to do is move the source data to a whole separate file that will be a continuous dump of our bank statements. I've successfully pointed the pivot table source to the new file and it's pulling everything in fine, then applying a date filter for the table for whichever month we're on (set manually).
The catch with this formula I pasted is it works great for finding the 1st, 2nd and 3rd occurrence of the specified keywords, but of course only if a months worth of data is in the sheet.
How would this be changed to allow a date filter?
I.e cells A1 and B2 would be 5/1/18 and 5/31/18, use those two cells to define what the formula should look within to return the needed result.
EDIT: New formula. AND doesn't behave that way with array formulas.
Just add the date conditions to your IF statement. Say your dates in bk_download were in column A and your filter dates were in A1 and B1, this should work for the first formula:
=IFERROR(INDEX($D$2:$D$32, SMALL(IF(($B$2:$B$32="DFAS-CLEVELAND FED SALARY ***********xxxx")+($A$2:$A$32<=$B$1)+($A$2:$A$32>=$A$1)=3, ROW($B$2:$B$32)-ROW(INDEX($B$2:$B$32,1,1))+1),1)),"None")
Change "None" to whatever value/message you want when nothing is found.

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 SUMIFS function not returning results consistently

I have a spreadsheet that I use to keep track of my checking account, budget and spending habits. I have a list of my financial transactions from my bank that I put in a table that looks like this (All dates and amounts are random):
I populate a budget chart and table that looks something like this:
For awhile, I've been manually changing the fill of the Category tabs and manually populating the budget table. However, I realized that by adding conditional format rules that change the fill and text color based on specific text in a cell, I can add text like "Housing" or "Automotive" to the Category column and it would not only manually change the fill for me but it would also allow me to automatically populate the budget table. I tried using the SUMIFS function to do this.
Here's the way I tried to implement the SUMIFS function in the "Housing" cell for January in the Budget Table:
=SUMIFS('Sheet 1'!$D$2:$D$1000, 'Sheet 1'!$A$2:$A$1000, $A4, 'Sheet 1'!$B$2:$B$1000, ">01/01/2016", 'Sheet 1'!$B$2:$B$1000, "<01/31/2016")
This works for January and May, but when I use the same formula for February:
=SUMIFS('Sheet 1'!$D$2:$D$1000, 'Sheet 1'!$A$2:$A$1000, $A4, 'Sheet 1'!$B$2:$B$1000, ">02/01/2016", 'Sheet 1'!$B$2:$B$1000, "<02/29/2016")
It returns a value of 0 to the column. It does this for all other months. Any idea why this formula might not be working for me?
EDIT: Incase my forumla wasn't clear, I wanted to provide a break down. The SUMIFS formula is supposed to be summing all values in the Amount column (the 2:1000 is to have enough of an area to look for that it will cover a year of my regular updates to this table without having to update the search area) that fall into the specified criteria. Those criteria being the text "Housing" being in the "Category" column (which is following the conditional formatting rules so fill and text color are changed) and the value falls into the range of dates provided.
Replacing:
< with <= and > with >=
will bring your values into the correct range

How to show a value in one cell when current week is in another cell in excel

My first time to this forum.
I am a free range poultry farmer and I am trying to make spreadsheets to monitor my flocks. I have made the flock specific input sheets and now working on getting information for all of them into one summary sheet.
My question is...
I have the age of the birds going down column A also I have dates by week end date going down Column B... I would like to know how to have it that in one summary cell when the current date falls into one of the weeks listed in Column B that the corresponding cell in Column A is shown in that Summary cell (showing the current age of the flock). I would like this obviously auto update when the date progresses into another week.
Can any one help??
Thanks
Put the current date in the header (=TODAY() function or variations).
Name the current date cell (e.g. Current_date)
If your data are in table format I recommend putting them in a Table, this will insert your formulae to any new row started. If you dislike them you can simply create filters.
Use the formula in say C5 "=B5=Current_date" This will give you a logical expression, TRUE or FALSE. You can filter for TRUE to see the flocks to sell/cut.

Autopopulate Excel invoice using vlookup

I'd like to auto-populate an invoice in Excel from data I enter into a lesson roster (blank_monthly.xlsx).
Here I fill in the lesson cost under the date each time they come for tuition.
In the invoice sheet I would like to start writing a customer's name into a cell, I'd like the rest of the table to populate with information from the current month's customer roster.
Can I use =vlookup for this to reference the cell I type the client's name into which then pulls all the other information?
If your names are split on the invoice sheet, but not the lesson plan, then you can use VLOOKUP with wildcards as below
Lesson Plan sheet
Invoice sheet
* in the VLOOKUP function will match any characters.
=VLOOKUP("*"&$A2&"*",Sheet2!$A$2:$G$4,2,FALSE)
If your names aren't split then you can just omit the wildcard search, as below.
=VLOOKUP($A2,Sheet2!$A$2:$G$4,2,FALSE)
Currently if no matches are found then the function will return 0. If you just want a blank cell, then you can nest the function in an IF
=IF(VLOOKUP($A2,Sheet2!$A$2:$G$4,2,FALSE)=0,"",VLOOKUP($A2,Sheet2!$A$2:$G$4,2,FALSE))
VLOOKUP documentation is HERE. You should read up on it.
I assume your data sheet will contain 3 columns like: name, date of lesson and number of lessons. You then want to produce a nice report that your illustrated. The short answer is 'Yes', you can use VLOOKUP provided that you only have one row in your datasheet per person per day and you have a column with the concatenation of Name and date. Otherwise, you have to use SUMIFS. I recommend SUMIFS because it would be cleaner formula.
The name is easy to match. Date should handle itself, as long as you don't try to control Excel's magic. Date is stored as a number. The cell formatting makes it look like a date. Concatenate your Month, Day, Year to the proper format and use the DATEVALUE function.
If you have your anchors ($) correct, you should be able to copy and paste the formula. If you don't want to see 0s on your summary report, don't IF in the formula, control it using cell formatting - custom 0;;.
If you are familiar with Table vs Range, use table. Your formula will look nicer and you don't have to worry about extending your range as you acquire more lessons.

Resources