I have a list in Excel that allows me to drag-and-drop the following:
Y2014 Jan
Y2014 Feb
Y2014 Mar
Y2014 Apr
Y2014 May
Y2014 Jun
Y2014 Jul
Y2014 Aug
Y2014 Oct
Y2014 Nov
Y2014 Dec
I want the list to continue to Y2015 Jan and way beyond, but a list can only contain 255 characters. Is there a way to make this list continue? I want to be able to drag this list indefinitely, so that the year adjusts appropriately. Is this possible?
If you refer to a custom list, then you may want to consider a different approach.
Instead of a list, use real dates. In the first cell enter Jan-1-2014, next cell Feb-1-2014. Enter the dates according to your regional settings, so Excel recognizes them as dates, not as text. Then format with custom format
\Yyyyy mmm
Now drag down as far as you want. Excel recognizes that you want to increment by one month and the formatting shows the desired characters.
Alternative: You can have the real date in a helper column and drag down as described above. Leave the standard date format. In the column that is used by the macro, you can put a formula like this (if your date helper column is column Z, data starts in row 2):
=TEXT(z2,"\Yyyyy mmm")
The result of this formula is text. Drag down as far as required.
Related
Good morning!
I am trying to create a dynamic SUMIF by using a named array containing data in non-adjancent columns.
The situation is as follows:
I have a file with monthly data, where the columns are labelled as:
Jan 2010, Feb 2010, (...), Dec 2010, FY 2010 (...) Jan 2020, Feb 2020, (...), Dec 2020, FY 2020
I want to sum only the monthly data (Jan 2010, Feb 2010... Dec 2010, Jan 2011, Feb 2011, etc) and exclude the data in the FY column (FY 2010, FY 2011, etc etc)
I have named the array of monthly data that interests me as a range ("relevant_monthly_data")
I am looking at individual rows of data that interest me ("country_range"). Note that the country_range consists of only one column with all the countries. It has the same number of rows as "relevant_monthly_data".
The formula that I am using only works for the first set of adjacent columns (Jan-Dec 2010), but doesn't capture Jan-Dec 2011, 2012... all the way through to 2020 even though they are all part of the named array).
=SUM(INDEX(relevant_monthly_data,MATCH("Guatemala",country_range,0),))
Could you please help me?
I am sure it is a simple question, but I somehow cannot figure out how to sum this range beyond 2010 monthly entries...
Thank you in advance for your help!
I am trying to figure out how to use Conditional Formatting to setup so any dates under "Performed" regardless of before or after "Due" date will show specific formatting using NETWORKDAYS. Any dates of over 3 or more days (both plus and minus of "Due") will be red. And any dates of 2 or less days (both plus and minus of "Due") will be green.
I require these to be working/week days where if the "Due" date is e.g. 02 Nov 2020, and the performed date is 03 Nov 2020 (under 2 days) will be green. But if performed on the 28 Oct 2020 (as it is over 2 working days) will be formatted red.
Excel showing image of spreadsheet
I have currently used the following codes:
=NETWORKDAYS($D$5,$E$5)<3
=NETWORKDAYS($D$5,$E$5)>3
The first for the green, and the second for red.
Any help will be helpful.
Try using absolute value in your formula? For example:
=abs(NETWORKDAYS($D$5,$E$5))>3
so I have an excel file with 2 tabs. 1 tab lists some values for Aug - Dec 2019 is separate columns while the other tab is the average of every 3 months (ie: Aug - Oct 2019, Sept - Nov 2019, Oct - Dec 2019).
I am trying to create a formula to give me the average of 3 months (listed in tab 1) if the KRI_ID column (in column A) is the same.
Note: Dates are input in custom format (mmm-yy)
You dont need an Averageif formula, since the KRI_ID is unique to each row. You can simply enter the following formula in cell J2 and drag across then drag down from J2 for the rest of the rows:
=Average(J2:L2)
I have data in an excel sheet. There I have a column with date values like this.
13 May 2012
27 August 2012
21 June 2012
18 March 2012
16 November 2011
15 December 2011
Is there a way to convert it to a format like this? 1998-12-25
I am assuming your dates are stored as strings. If one of your data is in cell A1, use in B1
=DATEVALUE(LEFT(A1,FIND(" ",A1)-1)&" "&LEFT(MID(A1,FIND(" ",A1)+1,FIND(" ",RIGHT(A1,LEN(A1)-FIND(" ",A1)))-1),3)&" "&RIGHT(A1,4))
Then format B1 as Custom, Type: yyyy-mm-dd.
Shorter formulas are possible, in particular if you can assume that the day will always have two digits (e.g., 01, and never 1).
If your data are stored as numeric instead of string, then simply apply the formatting procedure described.
I am planning to add a simple formula to calculate the sum for each individual based on month (i.e. cell C14). If I change the month to March, then sum should be taken from Jan to Mar and if I change the month to December, then sum should be taken from Jan to Dec for that particular person.
I am currently using the follwoing formula, but it is coming too big. I have just added from Jan to Apr only and it is coming this long. I don't want such a big formula. Is it possible to change it to very simple formula?
=IF(C14="Jan",VLOOKUP(A17,$A$3:$M$11,2,0),IF(C14="Feb",VLOOKUP(A17,$A$3:$M$11,2,0)+VLOOKUP(A17,$A$3:$M$11,3,0),IF(C14="Mar",VLOOKUP(A17,$A$3:$M$11,2,0)+VLOOKUP(A17,$A$3:$M$11,3,0)+VLOOKUP(A17,$A$3:$M$11,4,0),IF(C14="Apr",VLOOKUP(A17,$A$3:$M$11,2,0)+VLOOKUP(A17,$A$3:$M$11,3,0)+VLOOKUP(A17,$A$3:$M$11,4,0)+VLOOKUP(A17,$A$3:$M$11,5,0)))))
Try this
B17: =SUM(OFFSET($A$2,MATCH(A17,$A$3:$A$11,0),1,1,MATCH($C$14,$B$2:$M$2,0)))
and fill down as needed.
I'm not sure if I can come up with a non-volatile formula.
In the above, we use the MATCH function to compute both the row offset into the table; as well as the width of the returned array.