Summarize Any Day Of The Year In Numerical Terms
May 23, 2007
I would like to create a code that would summarize any day of the year in numerical terms.
The formula for coding "days" is as follows:
Coding Month value + current day
Where "coding month" was a combination of the year and month.
The year can be summarized as a fixed value:
2007 yr = 4
2008 = 5
2009 = 6
Ignore anything prior to 2007 and anything after 2009.
The month is simply a SINGLE digit to represent the month and where
January=1, feb=2, march=3......Sept=9. Once you hit October, you have to reduce the values to a single digit, so October = 10 = 1+0=1, November =11=1+1 =2, December = 12 = 1+2=3
Therefore, May 2007 = 4 ( 2007 ) + 5 = 9
June 2007 = 4 + 6 = 10 = 1+0 = 1
Now, comes the addition of the individual day to the mix. If you wanted to find the value for May 23, 2007
You know that May 2007 is 5+4 = 9 so adding the 23rd day is 2+3=5
therefore 9 + 5 = 14. Right?
Not really...
Before reducing this final number down further, there are some double digit numbers that DO NOT get reduced further. They are:
a. 13,14,16,19
b. 11,22,33,44,55,66,77,88,99
These numbers have to be left as is. So, today, May 23, 2007 would be left as a "14"
Two more examples:
May 24, 2007 = 5+4+ 24 = 5+4+2+4 = 15 = 6
July 17, 2007 = 7 + 4 + 17 = 7+4+1+7 = 19 = left as 19
Final thought - It would be helpful, though not necessary, to have a notation besides these double digits. If series "a" could have a "KD" next to it and series "b" could have a "MN" next to it,
View 9 Replies
ADVERTISEMENT
Jul 10, 2007
I have data which I import from CSV files from a JDE application on a monthly basis, using "JobCostData" macro ( have not posted code here as it is contained in the attached file).
For each month I import the data my macro creates a seperate spreadsheet and names the spreadsheet as the "mmm-yy" the data relates to, and then takes the information from each sheet and collates this on to on spreadsheet named " Pivot Data".
I then run a second macro "MacroXX", ( again have not posted code here as it is contained in the attached file), this macro looks at the data on "Pivot Data" and creates a unique list of Work Order Numbers and Descriptions and copies them to the spreadsheet named "Report".
Now what I would like to do (and can't get my head around):
Once the "Report" has been populated I would like to come up with a series of total "Cost $" for each Work Order by:
1. Month, for the past 6 months based on a Calendar Month End date (Note: For now I have hard coded the dates, but I will add code at a later stage to prompt user to select a date which will then write this to cell H4 on the "Report" spreadsheet and have the other dates derived from this date.)
2. Year to Date (YTD) based on the Financial year the Calendar Month End Date falls
3. Inception to Date (ITD) based on the
Note:
1. I have tried using Pivot Tables but this will not give me ITD totals.
2. I would prefer to use a macro rather than formulas.
3. I have populated the "Report" spreadsheet with the expect result based on the current data.
View 3 Replies
View Related
Apr 29, 2013
Is it possible to enhance this line of code:
Code:
.Range("A1:EH" & llastrow).AutoFilter Field:=10, Criteria1:="Cows"
Which filters my database to display only rows in which column J (10) equals "Cows", to display all rows that equal "Cow" and "Chicken" and "Giraffe" and "Cheetah"?
View 4 Replies
View Related
Aug 21, 2008
I have a situation where I need to highlight different customers based on what there terms of payment are. Conditions 1 and 3 seem to be working fine but for some reason condition 2 is not working at all. I made sure all names are exactly as listed in the A2 cell....
View 9 Replies
View Related
Jan 28, 2010
I'm writing a macro to search for letters A to Z in one spreadsheet, and copy it's associated data into another spreadsheet where A to Z already exist.
Thus:
Cells.Find(What:="A", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
That works fine. It find's "A", then the rest of the macro moves to the right and copies the data needed:
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
THEN it goes to the NEW spreadsheet (where A to Z are already labeled) and pastes into the corresponding area. Thus:
Windows("The Other Sheet.xls").Activate
Cells.Find(What:="A", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
This works perfectly.
However:
What if, one day, "A" does not exist in the source data? If say, the data started at "B", because there were no results for "A". Currently, the macro will stop working if it attempts to search for a value that doesnt exist.
How do I make it, for example, Search for "A", find that "A" doesnt exist, then skip to Searching for "B", and then "C" and so on?
View 9 Replies
View Related
Dec 31, 2008
I have, for my formula, 2 constant values a and x, I then also have a variable, n. The formula I'm trying to convert into excel terms is
SIGMA (with respect from 1 upto n) ((1-x)^(1-n) * x)*a. Unfortunatly thats not drastically inteligable so i've attached a picture file that should explain it in more understandable terms. Now the problem im having is, sigma is a cummulative funtion, which in this example is relative to the variable n, firstly I don't know what formulas I would have to use in order to get a sigma/summination function, and secondly I am uncertain of how to link it to a variable range.
View 5 Replies
View Related
Mar 9, 2009
I have created a dictionary with technical terminology. It is in excel format with about 10,000 entries. The format of my dictionary ("Sheet1") is in three columns:
<vocabulary term> <pronunciation> <definition>
Now, I want to create vocabulary lists using my dictionary. The newly typed up vocabulary list (which only has the term, but not pronunciation or definition), will be copy and pasted into "Sheet2".
The "Sheet2" typed up vocabulary list is in the format:
<vocabulary term 1>
<vocabulary term 2>
etc...
I want to run a macro or script to dictionary terms (including pronunciation and definition) from "Sheet1" and put them into my vocabulary list "Sheet2".
The desired output list in "Sheet2" is: .....
View 11 Replies
View Related
Feb 6, 2014
this function I manage to select the result in terms of the objectives of the product code. and I need to search for a piece of the product code. The results will be the same in accordance with fragments but not the exact code.
View 5 Replies
View Related
Mar 18, 2014
I have thousands of data entries (each in their own row, all in one column) and need to separate the basic info. In the example below, say you want to isolate the Town names by entering a formula that can produce a TRUE or FALSE result. Is there a way to use the FIND function and a pool of terms to isolate cells that contain excess data (i.e.- produce a FALSE result for cells containing any words from a term pool like : "Police, Park, Power, Water, Community, Bakery, Grocery, Field, Garden, Post Office, School" etc... ) ?
Pic of sample spreadsheet with desired result:
Screen Shot 2014-03-18 at 3.14.09 AM.png
example as text:
A2 = Springfield
A3 = Springfield Police Department
A4 = Springfield Community College
A5 = Springfield Park Of Recreation
A6 = Des Moines
A7 = Des Moines Power & Water Company
A8 = Des Moines Sunrise Bakery
A9 = Des Moines Post Office
A10 = Des Moines Grocery Store
A11 = Lancaster
A12 = Lancaster Baseball Field
A13 = Lancaster Botanical Gardens
View 8 Replies
View Related
Jan 23, 2009
I have the formula where i can change a date to its equivalent in terms of quarters system with a date:
=CHOOSE(MATCH(MONTH(A2),{1,4,7,10}),"Winter","Spring","Summer","Fall")&YEAR(A2)
This is a school year configuration.
ex.
A2 = 10/1/2005: with the formula up there it turns into Fall 2005
i want to be able to add any number of years and the formula will still come up with the quarters system
also i would like A2 to be stationary and create a list of quarters for each year i add on
ex.
A2= 10/1/2005 B2=Fall 2005
B3=Winter 2006
B3=Spring 2006
B5=Summer 2006
B6=Fall 2006
etc.
If this is all possible lastly I would like to negate summer quarters
View 9 Replies
View Related
Sep 18, 2009
1) This exercise would save me considerable time and would almost certainly eliminate the possibility of typing errors in preparing the input data file for another application.
2) My program requires each input multivariant equation to be specified as follows and in the same order:
--Number of Independent Variables, N (max 10)
--Number or Terms, M (max 20)
--Term 1: power of var 1
: power of var 2
: ..............
: power of var N
: coeff
--Term 2: power of var 1
: power of var 2
: ..............
: power of var N
: coeff
........................
--Term M: power of var 1
: power of var 2
: ..............
: power of var N
: coeff
3) It would be extremely helpful if I could type the equation (of up to 10 variables and up to 20 terms) in a cell on a w/s and automatically get the above particulars extracted and nicely tabulated in a column.
4) Simplified Example: (3 var & 4 terms).........................
View 9 Replies
View Related
Dec 12, 2009
I'd like to find out the formula where numerical valued between 1-2000 equals True and numerical under 0 equals False. Examples are in the attachment.
View 3 Replies
View Related
Sep 25, 2006
I have two combo boxes: One for entering the Year, and one for the month. I can produce a message if the user leaves either box blank but I want a message to apear it the user selects a year AND month less than the current year (iYear) and current month (iMonth). I therefore need an AND statement between the two criteria but i dont know how to do it.
'....First Checks the Comboboxes arent blank then below Checks a future month/year secection is chosen
ElseIf YearBox.Value = iYear & iMonthbox < iMonth Then
MsgBox ("You may not enter Data before the current Month")
Else '...... Run main code here
View 3 Replies
View Related
Dec 8, 2013
Looking for a formula to compare current year values to previous year values. For example, if the current year has values for the month of January through March (100, 100 and 150), current year value will be 350 and the previous year value will be 975 (i.e. 300+275+400). The aim here is to make the previous year months summation equal to the present (or current) values. As new values are entered for the current year, the previous year's values will have to change to reflect the new month's value entered for the current year.
Month 2012 2013
Jan 300 100
Feb 275 100
Mar 400 150
April 650
May 454
June 800
July 500
Aug 375
Sep 525
Oct. 300
Nov 410
Dec 510
Sample file is attached : Comparison_Years.2011.xls‎
View 4 Replies
View Related
Mar 8, 2014
I am working on a budget for myself and want it to have running dates so the first data column will have the current month. I was able to succeed with this using the EOMONTH function followed by EDATE functions in the following cells, I then have these columns filled using a nested VLOOKUP MATCH function pair.
The problem I run into is with the months that extend into the next year, in my data table I have month by month listed started on 01/01/2014 ending 12/01/2014 but as soon as the month is no longer January the last column in my budget cannot find the information needed due to it looking for 2015. so what I would like to know is if there is a way to make the data table change the year to the following year after today is beyond that month, so for example on March 1 2014 both January and February would be changed to 2015.
Attached is an example : Budget Example.xlsx‎
View 4 Replies
View Related
May 14, 2009
I have dates in my column “A”, for example (A1 cell =22-Mar-1971), (A2 cell=30-Dec-1965). Now my requirement is in B column date and month from A column and year should take current year. Output in B column (B1 cell =22-Mar-2009), (B2 cell=30-Dec-2009)
View 3 Replies
View Related
Dec 13, 2011
I am trying to do an IF statement, if the activecell's value is equal to this current year, do nothing and if its not the current year, to offset one column to the right and insert a blank column, then copy the whole column to the left and replace it with the new blank column.
View 1 Replies
View Related
Oct 13, 2008
i have the following table of information
Year DOB
7 01.09.96 -31.08.97
8 01.09.95 -31.08.96
9 01.09.94 -31.08.95
10 01.09.93 -31.08.94
11 01.09.92 -31.08.93
and a list of dates i need to look up the date to see which year it falls in and return the year
View 9 Replies
View Related
Feb 27, 2009
DATE function won't return TODAY()'s year in the "year" slot.
Is there a way convert, for example, 2/8/1963 to 2/8/2009 without using Concatenate?
View 9 Replies
View Related
Sep 29, 2006
I know that in order to draw a chart where a data line for a certain period is compared with the same period the previous year, one should have the 2 sets of data of different year side by side columnwise. However, is there a way where I could still churn out the same line chart when the data is all on a single column?
View 9 Replies
View Related
Oct 21, 2009
1. I need to convert a year into a decimal year ie. 1830 into decimal year (I don't have a month, just year)
2 Year/month into decimal year/month
I just not sure what to do, is the year stored as a number/text/date. What should it even look like? Does 1830 display as 1830.00 using excel.
View 9 Replies
View Related
Oct 22, 2007
I'd like to know a formula which can calculate the moving annual total, that is the sum of the last 4 quarters. Now every time the sales from a quarter is known, i have to recalculate the MAT mannually.
View 2 Replies
View Related
Dec 17, 2009
In attached sheet, I am trying to find total cost by month only for year 2009. Currently formula I have in Cell c24, is {=SUM(IF(MONTH(B2:B9)=1,D2:D9,0))} But this calculates for all years, not just 2009. How do I modify above formula, so for each month, it shows total cost but only for 2009?
View 2 Replies
View Related
Oct 15, 2007
I have a sheet in my workbook with at least 180 small tables, there may be more.
I woulds like to be able to change total formulas for all tables at once to show either year-to- date or total year.
For example:
If we have only progressed through the second period of the year, I would like to choose something to indicate period 2. At other time I may want to know the total year whether the periods are completed or not.
View 9 Replies
View Related
Dec 15, 2013
build a formula that can lookup and summarize.
I attached file >>>Lookup summary.xlsx
View 4 Replies
View Related
Jul 5, 2007
Date ModelStationLot_SizeSampleReject
04/7/07APCA771
04/7/07CPCA64320
04/7/07BPCA36320
04/7/07BPCA441
04/7/07CPCA110
04/7/07AB/B880
How can I quick summariz these data by VBA ? as below result.
Date ModelStationLot_SizeSampleReject
04/7/07APCA771
04/7/07AB/B880
04/7/07CPCA65330
04/7/07BPCA40361
This is just my sample data. The real data is more complicate than this. I want someone suggest me about VBA code.
View 9 Replies
View Related
Feb 4, 2009
I have a spreadsheet containing Date, Description and Value in a three column setup.
I wish to generate one summary for each unique description, based on a table of types. I can then say that for instance "Apple", "Oranges", "Lemon" are all part of a "Fruit" group.
The lookup would then find every row containing words in this group and summarize the values for them all.
View 7 Replies
View Related
Aug 25, 2009
I think I need a modified SUMIF formula but I can't figure it. The attached spreadsheet is a sample of what I need. I'm using Excel 2003.
View 3 Replies
View Related
Feb 7, 2010
I having trouble to sort out and summarize inventroy products for each week. I want to sumarize all weekly inventory in summarize table. Please see attached file. Pls keep the formate as i shown in attached spreasheet.
View 9 Replies
View Related
Jun 7, 2009
How Can we summarize the following
I tried to use For propety to summarize the number from 1 to 20 but it didn't work properly.
View 3 Replies
View Related