Excel formula to display ONLY month and year? - excel

Looking for an excel formula that will display "13-Aug" and means August of 2013. I would ideally want to copy the "13-Aug" cell to the 11 cells on its right, incrementing the month and appropriate year each time, so it would look like:
"13-Aug", "13-Sep", ..., "13-Dec", "14-Jan", "14-Feb"

There are a number of ways to go about this. One way would be to enter the date 8/1/2013 manually in the first cell (say A1 for example's sake) and then in B1 type the following formula (and then drag it across):
=DATE(YEAR(A1),MONTH(A1)+1,1)
Since you only want to see month and year, you can format accordingly using the different custom date formats available.
The format you're looking for is YY-Mmm.

Try the formula
=TEXT(TODAY(),"MMYYYY")

First thing first. set the column in which you are working in by clicking on format cells->number-> date and then format e.g Jan-16 representing Jan, 1, 2016.
and then apply either of the formulas above.

Very easy, trial and error. Go to the cell you want the month in. Type the Month, go to the next cell and type the year, something weird will come up but then go to your number section click on the little arrow in the right bottom and highlight text and it will change to the year you originally typed

Related

How to select a cell based on the current month in excel

I'm looking for some excel help.
I am trying to make a total cell that changes the value selected based on what month it currently is. Basically in the image the left cell indicates the $ amount for that month and that $ amount is in the cells on the right.
For example I want the total cell (not shown in the screenshot) to show 15363.21 from March 1 to 31st, and then change to 15388.81 on April 1st.
I have done some research but can't get this to work for me.
Pretending month is march Pretending month is April
It seems like you are asking for a lookup: "find the single cell in Column A that contains the current month and year, then return the corresponding single cell in Column F."
There are several ways to do this, but assuming your Excel version supports XLOOKUP, the code to place inside your total cell could be:
=XLOOKUP(1,(MONTH($A$4:$A$11)=MONTH(TODAY()))*(YEAR($A$4:$A$11)=YEAR(TODAY())),$F$4:$F$11)

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.

Converting month number from full date cell into text month in Excel

So I have a pretty long column with name dates and hours, like this:
14/01/2017 03:30
(They are DD/MM/YYYY HH:MM)
I need to get the month number and show it as text, like January, February, and so on.
If I format the destination cell as 'MMM' all the column cells show January even if the given month is 2, 3, or let's say 12. I also tried the formula =TEXT(L2,"mmmm") (since the given info come from column F.
Any ideas?
sounds like your date and time are stored as text and not in excels serial date format. You can test this by changing the format of the cell to general and seeing if anything happens if nothing changes then its text. another way would be to use the formula =istext(A1) where A1 is a cell with a date in it.
Now ASSUMING you do have dates in text format, I would suggest converting them to excels date serial. There are numerous ways of doing this. I will show you one way.
This will strip each component of the text out and then recombine it. We will assume your date in is A1
Strip out the year
=MID(A1,7,4)
Strip out the month
=MID(A1,4,2)
Strip out the day
=LEFT(A1,2)
Now to recombine it:
=DATE(MID(A1,7,4),MID(A1,4,2),LEFT(A1,2))
That will give you the date in an integer format that excel can then turn around and display as needed.
In order not to lose the time component you should strip that part off as well and combine it with the date. Remember the date is an integer, and the time is everything after the decimal. Think of time as a fraction of a day.
To get time out use:
=RIGHT(A1,5)
and to convert it to excel time:
=TIMEVALUE(RIGHT(A1,5))
and to get the two together, simply add:
=DATE(MID(A1,7,4),MID(A1,4,2),LEFT(A1,2)+TIMEVALUE(RIGHT(A1,5))
The key part to this whole thing is you will need to format that cell to display what you want. you can either choose a preformatted style from the drop down menu, or you can apply custom formatting. Setting the custom format to MMMM should display just the full name of the month.
IF you actually need the text of the month and not just the format, then you could use the formula from your question:
=TEXT(<insert appropriate formula from above>,"mmmm")
Try using MID to get the month only, then TEXT():
=TEXT(MID(A1,SEARCH("/",A1)+1,2),"MMMM")

Excel IF + AND + Date range formula

I am looking to create and IF function that does the following.
There is a ton of data with one column containing dates. I want and if functions that labels each row according to the following.
If date falls between 0-30 days of todays date in the past then label "GOOD" (so if todays date is 21/09/2017 then it should be labelled as "GOOD" should it falls between the dates 21/09/2017 and 21/08/2017)
If date falls between 31-60 days of todays date in the past then label "FAIR"
If date falls between 61-90 days of todays date in the past then label "ATTENTION"
If date falls between 91+ days of todays date in the past then label "CLEARANCE"
Hope someone can help.
Many thanks
Use
=IF(TODAY()-A2<31,"Good",IF(TODAY()-A2<61,"Fair",IF(TODAY()-A2<91,"Attention","Clearance")))
Column D shows the difference between today date and cell date.
Alternative Answer
Use VLOOKUP to potentially ease your future formula maintenance. In an unused location, set up a table that has your break point ranges and associated return values. For this example I used the following:
Technically speaking column G is not required, but it can be easier for some people to read.
Now assuming your dates are in Column A, you can use the following formula in B2 copying down:
=TODAY()-A2
and in C2 use the following look up formula and copy down to get your desired results:
=VLOOKUP(B2,$F$3:$H$6,3,1)
now if you are not keen on generating the extra column for calculate the number of days, you can substitute that first formula into the second to get:
=VLOOKUP(TODAY()-A2,$F$3:$H$6,3,1)
place the above in B2 instead and copy down.
The following is an example of the first approach:
The main advantage to this approach is you can manipulate the lookup table easily changing breakpoints, wording of results etc easily without touching your formula (when done right)
if you have the potential for negative days, instead of returning an error, you could wrap the lookup formula in an IFERROR function to give a custom message or result.
=IFERROR(VLOOKUP(B2,$F$3:$H$6,3,1),"In the Future")
Assuming your data starts with A2, A3 and so on.. as below
Apply the below formula in B2 and drag down up to A8
=IF(AND(--TEXT(TODAY()-A2,"##")>=-1,--TEXT(TODAY()-A2,"#")<30),"GOOD",IF(AND(--TEXT(TODAY()-A2,"##")>=30,--TEXT(TODAY()-A2,"#")<60),"FAIR",IF(AND(--TEXT(TODAY()-A2,"##")>=60,--TEXT(TODAY()-A2,"#")<90),"ATTENTION",IF(--TEXT(TODAY()-A2,"##")>90,"CLEARANCE","FUTURE DATES"))))

Excel Advanced Filtering Issues - Advice Needed

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.

Resources