Auto populate cell value with dates - excel-formula

I need to auto populate any two cells in Excel with the 16th of the previous month and the 15th of the current month based on the system date.
Example: Current month is January based on the system date.
So cell "A1" and "A2" need to be populated with 16-DEC-2018 and 15-JAN-2019.

You can just use excel formulas like Scott suggested. There's no reason to do this with VBA.
Give cell A1 the formula: =DATE(YEAR(TODAY()),MONTH(TODAY())-1,16)
Give cell A2 the formula: =DATE(YEAR(TODAY()),MONTH(TODAY()),15)
If you need the dates in that specific format, set the cells to have a custom format of dd-mmm-yyyy

Related

I need the updated sum from 1st to the current date

I have extracted the cell address of the current date by using:
=CELL("Address",INDEX($H$4:$AK$4,MATCH(G3,H4:$AK$4,1)))
G3 contains the day number of the month.
Now I need to use the Sum formula in G6 such that it adds the values from 1st to the current date which is updated by the function Today() in cell G1.
Is there a way I can use the Sum function to use the address inside the cell rather than the address of the cell.
You can download the sheet from here.
I think you are making it too difficult. Just use SUMIF, and make the criteria that the dates are less than today.
=SUMIF(date_range, "<"&TODAY(), sum_range)

Excel date conversion to day of the week: not working after 1 row

I want to get days of the month corresponding to each particular dates in a column in Excel (Note that I am using the web version of office Excel).
The formula =TEXT(A2,"dddd") works correctly for the first row and then when applied to the later rows does not perform as needed. It returns the same date and not the weekday. I have checked the format of the cells, and it is all sent to General.
See the attached image for reference, the formula worked in C2, and not after that.
Note: I have inserted a table for the required range.
Not Recognizing d/m/yyyy
For cell A2 you can use this formula instead (in cell C2):
d/m/yyyy (Your Case)
=TEXT(DATE(VALUE(RIGHT(A2,LEN(A2)-FIND("/",A2,4))),VALUE(MID(A2,FIND("/",A2)+1,FIND("/",A2,4)-FIND("/",A2)-1)),VALUE(LEFT(A2,FIND("/",A2)-1))),"dddd")
m/d/yyyy (Someone else might need this.)
=TEXT(DATE(VALUE(RIGHT(A2,LEN(A2)-FIND("/",A2,4))),VALUE(LEFT(A2,FIND("/",A2)-1)),VALUE(MID(A2,FIND("/",A2)+1,FIND("/",A2,4)-FIND("/",A2)-1))),"dddd")

Excel Formula for changing dates

If a DATE in A1 changes on a daily basis, I need for the DATA to change rows pertaining just to that DATE.
So if I have a column of dates from 12/1/16 to 12/31/16 and I enter 12/3/16 into cell A1 I only want data in 12/3/16 to be updated.
When I enter a value in B12 it populates it in cell D2 or D3 or D4 and so on depending on what the date is.
You need to change the mechanism that "automatically enters the numbers" and add a condition that compares the date in A1 with the date in the current row.
More details about that can be provided if you update your question as suggested in the comments.

How to use Conditional Formatting between a cell pulling info from a date and comparign to a cell that includes only text

I have an Excel spreadsheet that has sections broken out by month. The headers are individual month names, not dates. Each of these is color-coded to match the month. I have a single cell set aside to display the current month (using the TODAY function). I want to be able to style the cell depending on which month of the year it is.
I set 12 conditional formatting rules to check the cell against. I started out by using ="November" (as an example), but it doesn't seem to equate (TODAY()) with the word "November," so the rule doesn't apply. Either I need a new formula for the cell or there's some formula I have to use in the conditional formatting to get it to recognize the similarity between a date-formatted cell and a text-formatted cell.
Any ideas?
Assuming the cell is in A2, I would just change your conditional formatting formula to something like
=MONTH(A2)=11
TODAY() actually saves the Excel date value (e.g. 42695 for today) but using the MONTH() function will return the month number.
You could also alter the TODAY() formula to be something like
=TEXT(TODAY(),"mmmm")
That will convert the visible date to just show the month name and should still work for your original conditional formatting formula.

Excel date query

I have a cell at the top of the spreadsheet that contains the date (say Feb 2013). I want to create columns off of that "reference" cell. In other words, based off of that date, I want one of the columns to display. But when I attempt, this it simply does not auto-increment the date but displays some random date.
02/01/2013
02/02/2013
02/03/2013
..
..
02/28/2013
As far as excel is concerned, a date in excel is just a number incremented from some arbitrary day in the past. For example, type 2/5/2013 into any cell. Excel will automatically format this cell as a date. Now right click, and format the cell. Under the number tab, select general and you will see excel really has the date stored as 41310. Using this same principle, if you want to increment dates based off of a reference date, it can be done simply by =A1+1 assuming the reference date is in cell A1. For example, type 2/1/2013 in cell A1 and in column B type =A1+1. Now drag this cell down as far as you want. As long as column B is formatted as a date, it will increment day by day.

Resources