Highlight a cell if a referenced cell is today's month/day (not year) - date

I need to use Google Sheets to highlight a student's name if their birthday is today. I have Column A with student's name and a column D with student's birthdate containing the year. I need to highlight the cell that contains their name if it is their birthday today.
I have found Conditional Formatting formulas that show me if it is their birthday month, and those that show me if they were born today, but I do not want to include the year, and I want it to be for only today. I have tried to tinker with these formulas for a couple of hours to make one suit my needs, with no luck.

You can use the following formula to highlight dates that match today's month and day.
IF(AND(MONTH(B1)=MONTH(TODAY()),DAY(B1)=DAY(TODAY())),TRUE,FALSE)
For anyone looking for where to apply this formula for conditional formmating purposes, do the following:
In your sheet, select the column or range of cells you want to format, then go to Format > Conditional formatting, and choose "Custom formula is" from the "Format cells if..." menu to set your formula (then choose the other formatting options you want).

Related

add missing dates to my list of dates and numbers

I have lists of dates and corresponding numbers. I want to compare/contrast these lists. However, they don't all have entries/data on every date. Some have data for the same date, others don't. I want all of my lists to have all of the dates on a timeline, so I can create analysis charts against them. Is there a formula to add missing dates to a list? Do I need to create a boilerplate of my date range for the formula enter image description hereto check against?
thanks!
David

Get 3-letter month abbreviation for previous month in Google Sheets

I have a spreadsheet with individual tables named DEC19, JAN20, FEB20 etc.
Each of these sheets contains the first and last days in the respective month as dates, so e.g. sheet JAN20 has 1/1/2020 in cell A5.
What I would like is an automatic way to reference the previous sheet via an INDIRECT( prevMonthAsMMMYY(A5) & "!F195" ). Without resorting to macros, how can I achieve this prevMonthAsMMMYY?
try:
=INDIRECT(TEXT("1/"&MONTH(LEFT(A47, 3)&1)-1, "mmm"&RIGHT(A47, 2))&"!F195")

How to control number of bars in a bar chart based on date selection by user in Tableau

I have a date parameter which has a week split.
When I select Week 4 I need 4 bars(one for each week viz Week1, Week2, Week3, Week4) in a chart with sum of sales data.
When I select Week 3 I need 3 bars(one for each week viz Week1, Week2, Week3) in a chart with sum of sales data
and so on ...so when I select Week 1, i will have just one bar in my chart.
I tried using DATEDIFF with last() but I am not able to control the number of bars in the bar chart
Here is what works for me:
Create a parameter based on your date field, call it timeframe (or whatever), Data Type: Date, allowable values: all
Create a calculated field with the following formular
If [Date] < [Timeframe] then [Value] ELSE null END
with [Date] being your date field and [Value] being the original measure you want to display
Use the new calculated field instead of the original measure in your graph
Right click on the created parameter and choose " Show parameter controls"
Now when you change the date in the parameter controls, the amount of bar charts will adjust that only the weeks up to that date are displayed.
It should look like this:
Edit:
If you wanted an "All" option, you could go to the parameters settings, choose "List" as the "allowable Values" and add the values from your date field.
You then just create an additional item manually with the Value of "01/01/2011" or any other date far in the future) and Display as "All".
However this will only work if you have static data! If you update your source and new, more recent values were added, they will not appear in the list since you specified explicitely which values to be available.
I also realized the following:
If you do it like I explained, you will be able to choose particular days, that might lead to different graphs for different days of the same week. Ie if I choose tuesday orfriday of the same week, I will have different sized bars although the sales of the whole week stay obviously the same. If that is alright for your use case, go for it. Otherwise you should create another calculated field with DATETRUNC("week", [date]) and use that for the paramter and calculation. With that you can only choose the week, so no matter which day of a week you choose the bar will always have the same height.

Excel - Insert "day" on a cell and format it to date with current month and year

I am working on a home accounting template (and could not find any good one :-/), so I am creating one for each month. Both in my expenses and my incomes, I would like to have a date column where I just have to insert the "day" (e.g.: 22) and it automatically fills the rest with the current month and year (or I could set them in another cell).
For example: 22 + ENTER would return: 22/12/2014
If I do this, I automatically get a default date: 22/01/1900
I do not know if it is possible to change this defaul date depending on the current one or any other value.
I have tried with a different strategy: if the amount column is not empty, fill in with today's date: =IF(A3="";"";TODAY())
The problem is that I do not always register today's expenses, so I need to change it manually. I was just wondering if this is possible and there is a better way (maybe a macro?).
You need Excel to modify the cell contents after you press ENTER. The only option seems to be a Macro using the Worksheet_Change event.
Please check out this other question. I think that will help.
This can be achieved with simple formatting and use of controls that are available in Excel. VBA will give you drastically more flexibility, however the request above can be accomplished without learning VBA.
I have included a sample file here.
Steps to recreate:
Create a range of months. I created a range including the current month through 12/2014
Insert a combo box from the developer tab. Right click and select Format Control. On the Control tab, input the range you just created and then select a "linked cell". This will insert an integer to indicate which item you picked in the list, starting at 1.
Use the attached formula to add the DAY that you enter in the first column and VLOOKUP the month and year from the value chosen in the combo box.
Enhancements: I used conditional formatting to change the text color of the days you enter to WHITE. This way you won't see them. I also included some checking in the VLOOKUP formula: the day you enter must be a number and must be non-blank for a date to populate.

How do I change the formatting of the data series labels in a Crystal Reports bar chart?

My data series in my bar charts are an amount for every day in the month, and for every month in the year. Crystal insists on labelling each data point with a full date, i.e. yy/MM/dd. For the month chart I want dd/MM and for the year chart I want MM/yy. How do I achieve this?
All three options are based on this formula:
ToText({Employee.Hire Date},"MM/yy")
If you've grouped a date field and the chart is in the report-header section, change the group-name calculation to use this formula (Change Group... | Options | Customize Group Name | Use a formula as Group Name)
If you are using the 'Advanced' layout, create a formula field (using text above), add this formula field in the chart's "On change of" list.
If you've based your chart on a cross-tab, create a formula field (using text above), add this formula field to the Rows list.