Consolidating Consecutive Date Rows

Feb 3, 2010

I am working with an excel file that shows daily whether an individual is checked into a shelter. The dates are often consecutive. I am trying to merge rows to reflect a true length of stay, not daily. here is what my data looks like:

First Last SSN DOBEntry Date Exit Date
JaneDoe1111111111/11/11114/1/20094/1/2009
JaneDoe1111111111/11/11114/2/20094/2/2009
JaneDoe1111111111/11/11114/3/20094/3/2009
JaneDoe1111111111/11/11114/4/20094/4/2009
JaneDoe1111111111/11/11114/5/20094/5/2009
JaneDoe1111111111/11/11114/6/20094/6/2009
JaneDoe1111111111/11/11114/7/20094/7/2009
JaneDoe1111111111/11/11114/8/20094/8/2009
JaneDoe1111111111/11/11114/9/20094/9/2009
JaneDoe1111111111/11/11114/10/20094/10/2009
JaneDoe1111111111/11/11114/12/20094/12/2009
JaneDoe1111111111/11/11114/13/20094/13/2009
JaneDoe1111111111/11/11114/14/20094/14/2009
JaneDoe1111111111/11/11114/15/20094/15/2009
JaneDoe1111111111/11/11114/16/20094/19/2009
JaneDoe1111111111/11/11114/21/20094/22/2009

Here is what I would like it to look like:
First Last SSN DOB Entry Date Exit Date
JaneDoe1111111111/11/11114/1/20094/10/2009
JaneDoe1111111111/11/11114/12/20094/19/2009
JaneDoe1111111111/11/11114/21/20094/22/2009

Does anyone have any suggestions on how I can accomplish this with a macro or otherwise so I don't have to manually go through a year's worth of data? Thanks for your help and time.

View 9 Replies


ADVERTISEMENT

Use Data From Consecutive Rows Into Non-consecutive Rows On Different Worksheet

Feb 26, 2013

I am working on two worksheets. On my first worksheet I have one column with consecutive numbering starting from Cell 8.

A8 = 1
A9 = 2
A10 = 3
A11 = 4
A12 = 5

On my second worksheet I want to link to the values in the first worksheet but not in a consecutive manner. Each number will have an interval of 15 cells. As shown below:

D15 = 'link on Sheet1!A8'
D30 = 'link on Sheet1!A9'
D45 = 'link on Sheet1!A10'
D60 = 'link on Sheet1!A11'
D75 = 'link on Sheet1!A12'

View 6 Replies View Related

Consolidating Many Rows Into One

Aug 8, 2009

I have data that looks like this.

A1 B1 C1
1 2 100
2 3 100
3 4 100

My result should look like '1' in column A1, '4' in column B1 and '100' in column C1. I have hundreds of rows this way and any help will speed up my process. I tried writing a macro, but have no idea on how to delete the rows in between. Even if we can copy the result to the next column (i.e. have '1' in column D1, '4' in column E1, and '100' in column F1, that will solve the problem.

View 3 Replies View Related

Consolidating Multiple Rows Into One

May 1, 2008

way to combine multiple rows into a single row using vba?

I have large amount of data approximately 5000 rows. I would like to combine all of the rows by DOB.

The reason why they are listed multiple times if they have multiple Benefit #'s.

Here is an example of the multiple rows of data: ....

View 12 Replies View Related

Patient Dataset - Consolidating Rows

Dec 3, 2013

I have a large patient data set consisting of one column that includes their zip codes and one column that includes the number of times they were seen at a hospital over a period of time. I want to try to consolidate the data so I just have the number of total cases (for all patients) in a certain zip code over that time period. There are several thousand patients and it would be great to avoid doing it manually.

View 1 Replies View Related

Consolidating Text In Rows By Zipcode

Apr 17, 2009

I have a zipcode file I am trying to consolidated that has zipcodes and customers. how to consolidate the customers into a single row by zipcode as outlined below

Current Data
Zipcode Customer
00001 Customer 1
00001 Customer 2
00001 Customer 3
00002 Customer 4
00002 Customer 5

Desired output
00001 Customer1, Customer2, Customer3
00002 Customer4, Customer5
etc etc

View 6 Replies View Related

Consolidating Rows Of Data In To One Row Based On Cell Value?

Nov 21, 2012

I am trying to consolidate rows of data in to a single row at Cust Ref level (column A) but I need to ensure the numbers in each monthly column are added up accordingly so I have one total per month by Cust Ref. I hope what I have said makes sense. I have attached the spreadsheet so you can see what I am talking about.

View 6 Replies View Related

Consolidating/Averaging Multiple Rows & Columns

May 29, 2007

I am trying to compile a spreadsheet for my job that will find an average of all the break times and meal times that all the employees take. I have the employee list and their respective timeclock punches for the week, so I took that and found their meal and break times for each individual day, but I'm having trouble when it comes to consolidating and averaging the data. The first column lists the employees, but their names are repeated depending on how many times they punched the clock that week, and since not every punch was a meal or break, my time columns contain a lot of zeroes that aren't needed. I need a way to just average each employees' meal and break times.

View 9 Replies View Related

Selecting Non Consecutive Rows

Feb 28, 2009

I am trying to select non consecutive row in a 700 row spreadsheet in order to change the conditional formatting of those to grey. The change of colour is no problem but I cannot find a way of making the vba instruction to use the user selected rows.

An example would be if the user selected rows 10, 34, 56 and 89 to 105. how could I use this information as the basis for the next instruction.

View 9 Replies View Related

Formula To Count Consecutive Rows

Nov 18, 2009

create a formula that counts consecutive rows that have wins and losses.

A B
1 Game 1 Win
2 Game 2 Win
3 Game 3 Win
4 Game 4 Lose
5 Game 5 Lose
6 Game 6 Win
7 Game 7 Lose

So Consecutive wins = 3
Consecutive losses = 2

View 9 Replies View Related

Name Each Range Of Rows With Consecutive Dates

Jul 8, 2006

I filled sheet1 with the following

Set SourceRange = Worksheets("Sheet1"). Range("A8:A73")
Set fillRange = Worksheets("Sheet1").Range("A6:A64000")
SourceRange.AutoFill Destination:=fillRange

This filled cells with 7:00 AM, 7:15, 7:30.....11:00 PM all the way down to row 64000,in colum A, 65 rows at a time.

After this, I selected rows 8 to 73 and named it Friday_July_7.

How do I name each chunck of 65 rows based on the prior day, the first range idealy named from a variable assigned to the Now method and incremented with a loop?...or something

I also set a "TODAY" button and a range "SHOWDAY", in the (frozen) first 7 rows of sheet1 to show the current day with the following code.

Private Sub TODAYBUTTON_Click()
Worksheets("Sheet1").Activate
ActiveWindow.ScrollRow = 8
Range("SHOWDAY").Select
Range("SHOWDAY").ClearContents
Range("SHOWDAY").Value = Now
End Sub

In a perfect world, opening the workbook would activate a procedure that would display the current day in "SHOWDAY" and also scroll to the cooresponding range. clicking the today button would do the same. From here I could refrence each days worth of data by its range name.

View 4 Replies View Related

Hide Rows Not Having X Consecutive Values

Dec 12, 2006

I wanted to see if there was a way to hide rows that do not have a pre determined amount of values in a row (one after another). Attached is a simple spread sheet to hopefully illustrate what I need.

I'd like to be able to only show rows where 2 consecutive 0's exsist. Then 3 consecutive 0's. Ultimately I'd like to show anywhere from 2-12 consecutive 0's and have that selection available via the combo box.

View 5 Replies View Related

Validation List With Non-consecutive Rows

May 23, 2007

What I need specifically is a situation where you choose the Month/Year in a drop down menu in say A1, and then cells B1-Bx display the dates of each day of the month. I’ve been reading tutorials at breakneck speed, and will probably continue to do so.

View 2 Replies View Related

Count Number Of Consecutive Rows Of Equal Value?

Dec 27, 2013

I'm looking at test results and would like to know how many times in a row correct answers were given before getting one incorrect. The way I have this currently set up, is if a student has the answer correct it returns a "TRUE" value, and a "FALSE" value for an incorrect answer. A typical test may have 50 questions, so I would have either "TRUE" or "FALSE" values in rows A1 through A50.

So I've been trying to figure out a formula that counts the number of times "TRUE" rows repeat 'consecutively' in a given column, in this scenario column A. The formula would need to check the current row and if "TRUE" check the row immediately after, if that row is also "TRUE" then check the row immediately after that, until it runs into a "FALSE" string, then display that total count of consecutive "TRUES" in another cell. I understand there may be duplicate results but I'm only really interested in the longest value, so duplicates can be ignored.

If it makes the formula easier, each possible result can be assigned to it's own cell. Let's assume the test has 50 questions. So if a student got all 50 questions correct the result count would be 50 in cell B50, or if they got 25 correct before the first incorrect answer, cell B25 would say 25, etc. I'm guessing I could then easily query this column for the largest value to come up with what I need at a glance.

View 5 Replies View Related

Non-Consecutive Rows Converted To Columns On Another Worksheet?

Apr 24, 2014

I have a worksheet with a series of data in rows. Every 40th row is a sum of the previous forty rows.

I have a second worksheet that in a series of columns uses the 40th row sums from the other sheet. So column 1 uses row 40, column 2 uses row 80 data, etc.

Every time I update this, I create the new column using a copy and insert copied cells and then have to go to each field on the new column that uses this other worksheet to correctly update the formula for the new row. As when I do it this way, if Column 1 cell a1 formula said "worksheet2!A40, then the new column 2 cell b1 says "worksheet2!B40, where I want to make it be worksheet2!A80. I have tried highlighting a series of these corrected columns and dragging the formula over but still get a change in columns vs row from the other sheet.

I am looking to see if there is a way to do something like (in layman's expression):

(first column) worksheet 1, cell a1 = worksheet 2 cell A40
(second column) worksheet 1, cell b1 = worksheet 2 Cell A80
(third column) worksheet 1, cell c1 = worksheet 2 Cell (A80+40)
etc....

View 3 Replies View Related

Macro To Copy And Paste Into Consecutive Rows

Aug 4, 2014

I would like a macro which will copy range $A$1:$Z$1 and paste it as values into AA1:ZZ1.

Easy enough on the first run; but on the second, copy the same range $A$1:$Z$1 and paste it as values into AA2:ZZ2

third run into AA3:ZZ3, etc.

View 2 Replies View Related

Difference Between Start And End Rows Of Consecutive Data

Oct 3, 2011

I am trying to write a spreadsheet to accomplish the following function. One column (column a) will be data in which there will be consecutive entires of the same value. There will be a seperate column (column b) of data which is related to the first. I want to create a third column which calculates the difference in the values in column b, which correspond with the first row, and last row of a consecutive block of column A values.

I was thinking the simplest method would be to calculate a given row's difference between the first row of the block. The only problem Im having is determining where a block begins, since the will be multiple occurances of blocks of data.

View 7 Replies View Related

Lookup And Return Names With Non-Consecutive Rows

Nov 6, 2013

Having an issue with an array formula.

{IFERROR(INDEX('sheet2'!$A$2:$A$14,SMALL(IF('sheet2'!$C$2:$C$14="X",
ROW('sheet2'!$A$2:$A$14)-ROW('sheet2'!$A$1)),C$2),1),"")}.

Originally I did not need to skip any rows, but now I have to skip certain rows. I've tried using my current array formula and skipping the rows not needed but can't get it to work.

{IFERROR(INDEX('sheet2'!$A$2:$A$5,$A$9:$A$14:SMALL(IF('sheet2'!$C$2:$C$5,$C$9:$C$14="X",
ROW('sheet2'!$A$2:$A$5,$A$9:$A$14)-ROW('sheet2'!$A$1)),C$2),1),"")}.

Can this still be done with an array formula? I need to skip rows 6, 7, 8. Not sure what I'm doing wrong but no names are appearing. Sheet 1 looks like this with "Job Titles" starting in A2 on sheet1.

Job Titles
Dept.
1
2
3
4

Claims
CSI

Outb Calls
CSI

Notifications
CSI

Evaluator
CSI

I tried a new formula in cell C3

:=IFERROR(INDEX(Sheet2!$A$2:$A$14,SMALL(IF(ROW(Sheet2!$C$2:$C$14)=9,
IF(Sheet2!$C$2:$C$14="x",ROW(Sheet2!$A$2:$A$14)-ROW(Sheet2!$A$1)))),C$2),1),"") entered as an array.

I should see the name "C. Pepper" followed by "L. Smith" when I copy the formula to the right into D3, "J. Rast" would be skipped as these are the rows not being picked up, but nothing is showing.

Sheet 2 looks like this with "Staff Name" starting in cell A1:

Staff Name
Mgr
Claims
Outb Calls
Notifications
Evaluator

A. Hawkins
Adams

[Code] ..........

View 3 Replies View Related

VBA - Find First Two Consecutive Empty Rows In Column

May 4, 2014

I'm experimenting with a For Loop, and I don't know how to "tell it when to stop at the end of the column", because the columns have an empty row and then more data.. then an empty row and more data etc So the end of the column would be where there are two empty rows.

Code:

Sub eighteenrowsdown()
'
' eighteenrowsdown Macro
'
'
Dim rng As Range
Set rng = Sheets("Sheet3").Range("I3", "AE3")
Dim i As Integer

[Code]...

I know the code is bad but as long as I can get it to stop at the end of the column I'll be happy

View 6 Replies View Related

Non Consecutive Rows Sort Data With Multiple Ranges

Feb 23, 2010

Once again, I'm seeking some further assistance to an issue that I have yet to resolve.

I have several rows of data which I'd like to be able to sort by the info in column "A".

The data rows are not all consecutive. The range for which the data resides are:

Range("A25:A73,A85:A105,A145:A193"), When I sort I want my data to stay within these limits/ranges.

View 8 Replies View Related

Copying 193 Rows Yet Referencing Consecutive Cells From Different Sheet

May 1, 2013

I have a worksheet "parent child" with product data, cells F4 and BK4, pull pertinent data from cells T2 and M2 respectively on a different sheet "products".

A5:A196, D5:D196, F5:F196 is dependent on cell F4 and BK5:BK196 is dependent on BK4.

Once we get to row 197, the cycle starts over again. F197 and BK197 needs to equal products!T3 and products!M3. Then rows 198 through 389 will be dependent on row 197.

I basically need this to repeat perpetually for about 1000 different products on the products sheet, thus the ability to create approximately 193,000 rows.

I am not sure what it will take to do this, i am fine if I have to drag and copy all rows, which I have tried to create and failed at, I end up with products! T196, instead of T4.

View 1 Replies View Related

Pull Every Instance INDEX/MATCH Criteria Into Consecutive Rows

Jan 11, 2010

I'm trying to fix a report that I created but can't seem to figure out a way to display the information for a single student.

I've attached a mock report up so that maybe it would make more sense.

So the first tab, 'DIR', I managed to find a way to pull up only the information for a single student that was selected in the drop-down D1 cell. For that I used a simple INDEX/MATCH combo. The student's name would only appear once in the 'Paste DIR' tab, so it was fairly simple to create these formulas.

Now for the 'Paste Outreach' tab, a student appears multiple times in the chunk of information. Right now, the way that I have the report is so that it would just pull the information from each row, regardless of the student. What I would like to do is find a formula similar to INDEX/MATCH, but find every instance when the criteria is met for the INDEX/MATCH. I would like to be able to log each instance a student has an Outreach log entered. Then if I switch the student selected in D1 of the DIR tab, then it would only populate their Outreach Logs.

So if Student Name & Outreach # matches D1 ('DIR' tab) & "90" in "Paste Outreach, then pull row info into rows 7-11 in Outreach.
Find the next instance Name & # matches, and pull that into rows 12-16, etc.

View 4 Replies View Related

Excel 2010 :: Count Consecutive Numbers Over Multiple Columns / Rows

May 27, 2014

I'm using Excel 2010 and my spreadsheet contains numbers in columns A:E and approx 500+ rows. Here is a 10 row example of my data:

A B C D E
0 1 2 3 4
5 6 7 8 9
0 2 4 6 8
1 3 5 7 9
1 2 4 5 8
3 4 5 6 9
9 8 1 2 3
7 6 1 4 0
0 8 2 1 9
1 0 5 3 2

I would like to count the number of consecutive times each number appears (to a max of 9 consecutive times in a row). So, from my example above:

Number 1 appears:
1 consecutive time = 1 (appears in row 1)
2 consecutive times = 1 (appears in rows 4 & 5)
3 consecutive times = 0
4 consecutive times = 1 (appears in rows 7, 8, 9 & 10)

Number 2 appears:
1 consecutive time = 4 (appears in row 1, row 3, row 5 & row 7)
2 consecutive times = 1 (appears in rows 9 & 10)
3 consecutive times = 0
4 consecutive times = 0

Number 5 appears:
1 consecutive time = 2 (appears in row 2 & row 10)
2 consecutive times = 0
3 consecutive times = 1 (appears in rows 4, 5 & 6)
4 consecutive times = 0

and so on....

View 9 Replies View Related

Consolidating The Data

Oct 13, 2009

I have a sheet with the following information in rows:

PO# Acct# Item# QTY

There are multiple lines that share the same acct#.

How can I create the sheet so that each row combines the records for the same acct#.

For example:

PO# Acct# Item# Qty PO# Item# Qty PO# Item#

There are never more than 6 rows that share the same acct#.

View 23 Replies View Related

Consolidating Sheets One Below The Other

Nov 12, 2009

I have written a macro to consolidate multiple sheets into one sheet. I have two sheets which are to be copied one below the other.I am attaching the code for this here.

ub Bingo()
Dim ws As Worksheet, n As Long, flg As Boolean, last As Long
On Error Resume Next
Application.DisplayAlerts = False
Sheets("Consolidated-Input").Delete
Application.DisplayAlerts = True
On Error GoTo 0
Sheets.Add(before:=Sheets(1)).Name = "Consolidated-Input"
n = 3
For Each ws In Worksheets
If ws.Name "Consolidated-Input" And ws.Visible And ws.Name "DCS-User" And ws.Name "Cal" And ws.Name "DCS" = True Then
If Not flg Then
ws.Range("a:c").copy
Sheets("Consolidated-Input").Range("a1").PasteSpecial xlPasteValues
Sheets("Consolidated-Input").Range("a1").PasteSpecial xlPasteFormats
flg = True...................................

View 9 Replies View Related

Consolidating Workbooks

Jan 12, 2010

I have 85 workbooks in the same folder with a sheet in each workbook called "Budgets". Its the same template in each workbook with different data. I need to create a Summary master file of all my budgets so in the end I will have 1 Workbook with the 85 copies of the "Budgets" Worksheets. Does anyone know the VBA for this?

View 9 Replies View Related

Consolidating Data From Different Worksheets?

Sep 25, 2013

consolidate data from different workbooks into a single work book.

Each workbook contains one month payment information for employees.

i want to consolidate the the workbooks into one mastersheet such that i will have twelve columns (One for each month). On the consolidated sheet, i want each contributors monthly contribution displayed under the months to which the cointribution relates.

*find attached a dummy data illustrating the request*

i will like the results displayed as illustrated in the consolidate tab.

View 1 Replies View Related

Consolidating Data From Many Worksheets?

Jan 14, 2014

I have a clock machine report weekly which generates a spreadsheet very similar to the example attached.

The number of sheets can vary, the number of rows per employee can vary all of which makes me think that I can't use a formula to collate the data. how I can do this?

View 1 Replies View Related

Consolidating Multiple Calendars Into One

May 29, 2014

Tried the consolidate feature, however not sure that it is what I am looking for.I am basically trying to condense several calendars ( one calendar per department in a company) into one Calendar..Each calendar has its own tab and looks exactly the same. (tab names: Clubhouse, spa, and final calendar... possibly more departments added later) Hard to explaing so I will attach the file. All I would like to do is combine all calendars into the "final calendar" and in time order if possible... example below

{Clubhouse Tab} A3 will have the time (10 am) , B3 will have the item "Meeting"
{Clubhouse Tab} A4 will have the time (5 pm) , B4 will have the item "Dinner"

[code]....

View 14 Replies View Related

Merging Two Spreadsheets Not Consolidating

Jul 18, 2012

I have two spreadsheets of part numbers, one with a full list of parts approx 3500 lines and another with the same part numbers (but only approx 1000 lines) but this file also contains sales history. columns shown below

PART NUMBER, PART DESCRIPTION, RETAIL, COST, UNIT OF ISSUE, CURRENT STOCK, YTD SALES, MTD SALES

What i want to do is merge the two files together so the 1000 parts i have sales history for correspond with the same 3500 lines on the other master spreadsheet, so i can then sort them in which ever order i need at the time.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved