Copying Data Based On Dates And Ages
Feb 19, 2014
I am finally at the end of this project. I need to find a code that will copy any lines that the person has turned 65 in the previous month or that will turn 65 in the current month to the Monthly tab.
Sample Macro jscalem.xlsx
View 3 Replies
ADVERTISEMENT
May 14, 2014
I am trying to find a formula to find out peoples ages from their date of birth but on different dates.I know you can do age from DOB 'today' or on a given date, but I have date of birth in column A and the date they were seen in column B and I would like their age in column C. Is this possible?
eg
Date of birth | Date seen | Age at date seen
01/05/1989 | 01/01/2011| ?
02/02/1956 | 02/03/2012| ?
05/02/1930 | 05/05/2009| ?
View 7 Replies
View Related
Nov 4, 2008
I want vlookup to return results based on the *** and age of the person from tables in a separate sheet. For eg. if the person is "male" or "female" and if the person is "<=15", "16", or "17". I have been practicising with a formula that looks like this:
View 6 Replies
View Related
Nov 6, 2006
I have searched the forums to see if there is a similar prob already answered but to no avail (apologies if this has already been answered).
I am designing a sheet for a Uni project that needs to calculate the average attendance rates for students between age groups. My data has the age in a specific age for example:
Age
18
19
19
21
etc.
I am trying a SUMIF function that adds all attendance rates based on a criteria - however I can't get the criteria to fall between two ages ranges (more specifically, I need to sum the averages where the ages is between 21 - 25), as the function seems to only allow for one expression of criteria.
My function currently Reads:
=SUMIF(A1:A25, ">=21 & <=25", B1:B25)
Where A is the column recording ages and B is the column recording attendance rates. It presently returns 0.
Is there a better function for this task, or a way around the SUMIF criteria?
View 11 Replies
View Related
Apr 20, 2009
Need formula that will categorise ages. Column P contains the age of 4983 people. What I need to do is put these ages into categories in column Q:
0
1-4
5-9
10-14
15-19
20-24
25-29
30-34
35-39
40-44
45-49
50-54
55-59
60-64
65-69
70-74
75-79
80-84
85-89
90-94
95-99
100-104
105-108
So, if the person's age is 86 in column P2, column Q2 should read 85-89.
View 9 Replies
View Related
Sep 5, 2013
copying data from one sheet to another if it meets a certain criteria. I have a long aged debtors report that has several different cost centres and I want to split it out on to separate tabs for each centre. I want a function or marco that will go to row 1 and check if it equals the cost centre name on the other tab in a cell and then copy it and paste it in that tab, if not then it moves down to the next and the next until it gets one that does equal it and then copies it again.
View 1 Replies
View Related
Jun 22, 2014
I am trying to use VBA to move data from one column to another while using values of a third column as a reference for where each value in the first column should be moved to in the second. I will try to explain as best as possible, currently I have a macro that copies from one column to the required but due to the irregular spacing of the data it results in the data not matching with the data its being copied into.
Say I have Three columns A, B and C. I have a range of data in column A say dates that have irregular amounts of spacing between them. Column B is empty. Column C contains Data that is again spaced out irregularly and not in line with that of A. The value of column C cells is just identical values. Now the aim is to move the values from column A in the order which they are listed and place them in Column B next to each value in Column C. So say the repeated value in column c is EXAMPLE then everytime EXAMPLE appears in column C i want to move one date from column A into column B next to this EXAMPLE value, in order which it appears in column A. So the first date will move next to the first EXAMPLE value and the second date which appears next to the second EXAMPLE and so on and so on until it reaches the end of the sheet.
My thinking was placing the A column data in an array and doing some sort of sort.
View 3 Replies
View Related
Aug 23, 2008
I have data as follows.
In the first column name of the month is specified.And in the third column of the same row day is specified.And followed by some data in rest of the columns and rows.
I need to copy the data from the presant sheet to a new sheet based on some conditions.
first need to search for the row where the word "MONTH" is there.if it is found then in the same row third column need to be checked for the day like "MONDAY" or "TUESDAY".If it is monday then need to copy 6*8 array of data i.e. (6 rows and 8 columns) into a sheet "MONDAY".if it is TUESDAY then 5*8 array data into a new sheet TUESDAY.And the search should be continued till the end of sheet.
View 9 Replies
View Related
Apr 2, 2008
I have a worksheet named newvehicles with data in columns N to T. I have the branch names in column S.
I need VBA code that will copy all the branch names that are the same as well as their corresponding data i.e the data in columns N to T into a new worksheet with the same name as the branch being copied for eg if column S contains BR1, BR2, BR3, BR4, BR5 etc, then I need all the data for BR1, BR2 etc to be copied into a worksheet Br1, Br2 etc
The values are in columns P:R ("newvehicles"). I need these values to be added using VBA code as soon as this data has been copied accross. When pasted into the new worksheets, it can then be from the first column onwards
View 9 Replies
View Related
Apr 30, 2014
I have a workbook consisting of 5 sheets.
Sheet 1 is the master sheet, and (among many other columns) it has a series of yes/no columns. The yes/no options are the equivalent of:
"Are you in sheet 2?"
"Are you in sheet 3?"
etc.
When this is the Yes option, I would like the rest of the contents of the row to copy into sheet 2.
These need to remain linked, so if I change stuff in Sheet 1 I would like it to change everywhere.
View 4 Replies
View Related
May 11, 2012
I have a spreadsheet with data in a1:p100 and i'm trying to find a macro that anytime the cell contents change in either column B or Column F it copies the entire row to another tab in the spreadsheet.
View 9 Replies
View Related
Aug 14, 2009
On sheet "Create Package" in cell "AA14" I have a value (lets say 2).
I want it to go to sheet "Samples" and insert a number of rows equal to the value on sheet "Create Package" cell "AA14" (so 2 rows)
I have a header row in row 1, so I would like it to insert the designated number of rows beneath that.
Then I would like it to copy a designated number of rows (based off of the "AA14" value, so 2) from the "Create Package" sheet starting at row 66 and then paste special values into the new rows that were inserted on sheet "samples".
View 9 Replies
View Related
Feb 16, 2007
I am have a spread sheet (sheet 1) with a number of columns and what i am looking to do is see all the people that are participating in a certain stage in the process that is not common, So what i am wanting to do is copy the names and the corresponding number of these people (on sheet1) over to a new worksheet(sheet2) based on a yes or no criteria further on in the spread sheet(sheet1). sheet 2 has additional columns that the workers here would need to fill in.
The criteria is in sheet 1 cells Y2:Y2000
The number is in sheet 1 cells D2:d2000
The names are in sheet 1 cells E2:e2000
If its at all possible i would also like to then make the names of those people on sheet 1 a hyperlink to the additional information
View 4 Replies
View Related
Aug 22, 2009
I am trying to copy two cells from one worksheet to another in the same work book based on the value in Column B of one of the sheets. This is just a building block to a larger script I am going to create.
Below is my attempt but I keep getting an error at Range(Cells(x, 3)).Select.
View 7 Replies
View Related
Aug 5, 2009
I have a table with 'Product Rereference', 'Date', and 'Estimated Assets' Columns. I need to run a formula that will extract the number in my 'Estimated Assets' column, based on speicific list of 'Product Reference' numbers that I have filetered, and a specific date - 1/31/ of each year.
I've been trying to create a formula, however I can't seem to work it out.
I have attached a file, which should make things a lot clearer :P I am trying to make the data extract into the table to the right. I have filled in the first few columns manually, to show what I would like to formula to achieve.
View 4 Replies
View Related
Jun 17, 2014
Where is that I have 2 sheets of data, sheet1 contains an ever expanding list of data and I'm trying to create a macro that deletes multiple rows of data from this sheet if the date held within column K is less than the date defined in sheet2.
View 4 Replies
View Related
Jul 14, 2008
Copy Data From One Sheet To Another, Based Upon Dates ...
View 9 Replies
View Related
Jun 10, 2014
When I copy the dates from this spreadsheet into a new one, in the new spreadsheet the copied dates are different. Looks crazy. Why does this happen?
View 14 Replies
View Related
Feb 19, 2010
I’m attempting to find values that are within a band of .001 of the values of cells in columns L through O and searching columns B through I for values that meet the .001 criteria and copying the values to columns Q, R, S, and T respectively.
I mentioned the values in L, M, N and O are where the comparisons will be made and these values are tagged to a specific date in Column K. I need to find the dates in Column A that are in between the values of K and the cell beneath it. For example, in K4 I have a date of 10/3/99 and the next date I have in K5 is 10/5/99. I would then query Column A for the dates 10/06/99 (A4), 10/07/99 (A5), and 10/08/99 (A6). The values I need to find within the .001 band are in Columns B through I (B4:I6). Lastly, when reach the last value in Column K, query all values in Column A greater than last value in K and copy the appropriate values in B through I to Q through T.
Rules for copying data to Column Q, R, S, and T:
For Column Q-
Find values in B, C, or D that’s within plus or minus .001 of M and copy the value of B, C, or D into Column Q of the same row.
For Column R-.................
View 5 Replies
View Related
Sep 15, 2008
I'm making a budget in excel.
I have generated some dates that appear in column a. I want to make a macro that copies lines from sheet 2 and inserts them between the appropriate dates in column a sheet 1.
eg:
A
1/1/01
23/1/01
4/2/01
5/2/01
7/2/01
sheet2:
2/1/01
23/1/01
6/2/01
outcome:
A
1/1/01
2/1/01
23/1/01
23/1/01
4/2/01
5/2/01
6/2/01
7/2/01
the lines will also have 2 other fields for copying (description and amount).
I will also need to copy formulas to the inserted rows in some columns (eg balance) but not all (not the date column).
View 11 Replies
View Related
Aug 19, 2013
I have an Excel file containing data about employees. Each row contains a lot of information that is relevant for a specific date range, denoted by the columns "start date" and "end date". I would like to copy each row so that I have it accessible per date that is within the date range. The only columns that would change in the copy are the date columns. For example, for 1 row that has a date range of 01/08/2013 - 05/08/2013, I want to copy the row 5 times except the date columns become "01/08/2013", "02/08/2013", etc.
View 2 Replies
View Related
Dec 31, 2006
I have a very large Excel spreadsheet that is generated through an Oracle application at least once a month at work. I would like some code (either a worksheet function or a VBA) to check and report the following. If the frequency in column C is "Monthly" or "Weekly" just go to the next row. If the frequency in column C is "Annual", add 183 days to the date in column B; if it is "Semi-Annual", add 92 days to date in column B; if it is "Quarterly" , add 46 days to the date in column B; if the frequency in column C is "2-Year", add 365 days to the date in column B. Once the check has been made; I need the new total or date that was calculated checked against the date the report is being run (system clock date). If the date or total days is less than today, a new worksheet, titled "Late" needs to contain that row of data. If the date or total days is greater than today's date, just go on to the next row. I've attached an example worksheet.
View 9 Replies
View Related
Jan 17, 2013
I have a workbook with so many sheets as the working days of a month. I also have a Master sheet.
The sheets are named as the dates. Example: 020113 , 020113, 030113......etc
In the Master sheet, first column has ALL working dates of the month(i don't care about Holidays).
First row of this sheet are headers.
My goal is from the sheet of the certain date of the month automatic copied certain cells values(same in eatch sheet) to certain cells in Master Sheet.
View 7 Replies
View Related
Apr 30, 2013
I have a pivot table and and struggling to group these by month as well as to sort thee in escending order.
Pivot Table  ABC3Row LabelsSum of DebitSum of Credit
413/02/201334367.1822844.19513/03/201326475.492219.66613/08/201230307.613541.2713/09/2012
18898.0318065.4813/10/2012Â 7210.52913/11/201241969.041767.821013/12/201232844.7724041.26
View 3 Replies
View Related
Mar 27, 2014
I need to copy rows to sheet1 to sheet2 which matches with today's date. The code dosen't work wit date. I have attached ScreenShot of excel file.
Excel.JPG
HTML Code:Â
Function Data(strFrmSheet, strToSheet)
Sheets(strToSheet).Select
Range("B2").Select
Sheets(strFrmSheet).Select
Range("B2").Select
Do While (Not (IsEmpty(ActiveCell)))
[Code]....
View 4 Replies
View Related
May 21, 2014
I have a sheet with a lot of different data. In column M in workbook "Maximo report" there are 5 different values. I want to copy the rows that contain CDC_HVAC and that have the value "INPRG" in column G to the sheet HVAC_INPRG. I want to do this for all 5 values. Once the rows are in their respective sheets I want to filter them based on a formula and then sort from oldest to newest. I dont want the file to be too big and I think that VBA is the way to do it. I am new to VBA
View 6 Replies
View Related
Jan 24, 2014
I have three columns - as listed below. I need a script - That compares "result 1" and result 2. If there are data in the "result 1" column then input that into the "City" column. Else input "result 2" data (if any exist), else leave blank.
"Result 1" always has priority over over "Result 2".
City
result 1
result 2
San Fran
San Fran
New York
Tampa
View 4 Replies
View Related
Aug 16, 2007
I have a question that I am not able to answer.
Basically I have a worksheet with the following:
C4 -a cell where a user can input a number
the rest of the worksheet is data in a normal fashion.
I am seeking a macro that will select & copy cell G6 through whatever the value of C4 is. This selection would be a variable range with the offset being whatever is typed into C4.
Ex:
If the value of C4 is 5 then I would like G6:G11 to be selected and copied.
I am aware of offset, but don't know how to implement it in such a dynamic way.
View 9 Replies
View Related
Jan 26, 2009
I have the following code which takes a unique value from 'sheet 1', and searches for the value in 'sheet 2'. If there is a matching value in sheet 2 it will copy the full row into sheet three.
I need to extend the code so that all values from 'sheet 1' are copied to 'sheet 3' even if there is no matching value in 'sheet 2'. If there is a matching value in 'sheet 2' however I need the entire row to be copied to 'sheet 3'
Sub moving()
Dim c As Range, d As Range
Worksheets("Sheet2").Activate
For Each d In Worksheets("Sheet1").Range("A1:A500")
For Each c In Range("A1:A15")
If d = c Then
c.Resize(1, 70).Copy
Worksheets("Sheet3").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
Exit For
End If
Next
Next
Application.CutCopyMode = False
Worksheets("Sheet3").Activate
Range("A1").Select
End Sub
View 2 Replies
View Related
Nov 11, 2009
There is a Summary sheet from where data has to be copied to 3 different sheets(for 3 accounts) I have highlighted the columns that have to be copied. The macro will be run everyday, and each day only 3 rows from Sheet ‘Summary’ will be copied to the other sheets.
Important point: Only copy rows that have Column D value = GBP
Which Sheet to copy to? Check Column A ---
Case 100 = Sheet(“ONE”)
Case 200 = Sheets(“TWO)
Case 300 = Sheet (Three)
The Orange ones – Column C,I, and N are copied as follows: C goes to Column A, I goes to Column C, and N goes to Column J in one of the 3 output sheets.
It should not overwrite previously existing data, simply copy to next empty Row (By Empty Row I mean Column A is empty, columns after M may have values in many rows)
Then the Yellow columns. I need them copied on W26:W32. So that’s cells in Column E,J,K,L,M,R going to W26:W32. These yellow column figures must OVERWRITE previous data (unlike the Orange). The Blue cells that you see in Sheets (ONE,TWO and THREE) contain formulae that I want copied down to the Next Row when there is an entry made in Column A.....
View 5 Replies
View Related