I have a table with information about various events (1 row = 1 event). One of the columns in the table holds the date of the event in the format "YYYY-MM-DD".
The calendar in which I am trying to make the events appear automatically have one cell with information about year and month in the form "YYYY-MM-01". The day of the month is held in a seperate cell in the calendar on the format "D"/"DD".
If the year, month and day match, I want the acronym (held in a column in the table of events) of the event to be returned by the function and displayed in the calendar.
My first thought was to use a function like this:
=IF(AND(YEAR(Table13[Start Date])=YEAR($A$1);MONTH(Table13[StartDate])=MONTH($A$1);DAY(Table13[StartDate])=DAY(F3));Table13[Acronym];" ")
but I realised looking thru the table like that wont work.
Any ideas on how I can proceed? I hope the explanation isnt too messy.
Link to example file
Assuming your start of month and day numbers are stored as values, not text, then use this:
=IFERROR(VLOOKUP($A$1+F3-1,Table13!$A:$C,3,0),"")
Where Table13 is the worksheet where the lookup is happening with the data stored in columns A:C.
=IFERROR(VLOOKUP(VALUE($A$1)+VALUE(F3)-1,Table13!$A:$C,3,0),"")
Would work if the dates are text.
Related
I am attaching the macros, and desired result as an image.
So, I am running a macro to find differences (amounts) between dates that are selected from the slicer, using 'previous' as the base item in 'difference from' and it works perfectly. Now, I want to run another macro where the difference should be from the oldest of the selected dates. I hardcoded it once with a set of dates where the oldest date will always be 31-12-2021. But if I want to compare the data from 2021 then I need to find differences from 31-12-2020, basically the end of previous year. How do I make this base item dynamic so that it's either last end of year date or the oldest chosen date if someone is manually choosing the dates from the slicer?
My Macros
The desired pivot table result
Can I have the user enter the oldest date in a cell and have the vba code refer to that cell or something?
Any help would be appreciated. Thanks!
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.
I have to split up an excel vendor report with two thousand instances into a pivot table that displays instances that occured before 5PM, between 5-7PM and after 7 PM and I am stumped as how to do this. I tried adding another column with if and and functions to test where the time stamp falls within the given ranges but the only range that only pulls the before 5 PM category for some reason. Any suggestions?
You are right that you will need a helper column if you want your pivot table to be able to pull in the data. In the column to the right of your current data block, where I assume the timestamp is in column A, with a time/date format that Excel reads as such, try something like this (starting in the column to the right of your current data block, row 1 and dragged down):
=if(hour(A1)>19,"After 7PM",if(hour(A1)>17,"After 5PM, Before 7PM","Before 5PM"))
This will first check if it's after 7pm, and if it isn't it then checks if it's after 5pm, and if it isn't we know it's before 5pm.
If this doesn't work show us your data; my guess would be that your 'time stamp' isn't being read as a time stamp by 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.
This is possibly a tough one so forgive me while I spell out the exact circumstances and what is needed:
We have a workbook which is populated with data from our support calls (most of it is text) which is then analysed for certain criteria which are just Yes/No options (i.e. incorrect information received, late notice, etc). One of the columns is the date the support call was raised, formatted as dd/mm/yyyy. All of this data is on sheet 2.
What I have been asked to do is to have a management-friendly interface on sheet 1:
two boxes on sheet 1 labelled 'Month' and 'Year' - a manager can enter say January in Month and 2014 in Year and if they match the dd/mm/yyyy of any calls which were raised, this will then extract the whole row of values and place on sheet 3.
On sheet 1, a graph will then be populated from the data on sheet 3 to show things like how many support calls had incorrect information.
Any ideas? I've tried going through VLOOKUPS, MATCH and INDEX and can't find anything which makes any sense to me.
UPDATE
Thanks for all the input in such a short time frame. Apologies for not providing more information first time around - was on a tight deadline and had limited time to write the original post. Many thanks to both user2140261 and Scott Gall for the hints and explanations concerning pivot tables. I think that has given me enough information to head in the right direction (I ended up having to do the first graph manually, but seem to have some promising results with my first attempts with pivot tables and charts) so thank you once again.
When I have this properly worked out, I'll post some dummy information showing how it works in case anyone with a similar problem finds it useful.
May I suggest the use of a pivot table?
First break the Date Field into multiple columns on sheet two (which do not need to be visible btw).
Formula for Month: = Text(,"mmm")
Formula for Year: = Text(,"yyyy")
Then insert a pivot table on Sheet 1 using the whole data range on sheet two as the source.
Set the two new Columns (Month and Year) as Filters and the user can simply pick a month and year to view (multi select should also be available)
You will need to play around with what to put in the rows and columns and values a bit...
Keep in mind the default "Value" calculation excel will do is Count this is rarely the desired measure for the "Values" usually want SUM.. this can be changed by clicking the small down arrow for the value field and editing the field properties.
Note your graph can then be fed from the resulting pivot table.
Hope you find this helpful... if so please vote up.