Reading Consecutive Dates As One

Oct 12, 2006

how would you read consuctive dates as one

example

person is sick on 10/9/06 and on 10/10/06 . i want that to be read as one sick. now if the person is sick on 10/09/06 and then sick on 10/11/06 that would be read as 2 sicks.
what i need is the consective dates to read then one to read the dates that are not consectutive . giving a total for each one.

View 4 Replies


ADVERTISEMENT

Individual Dates To Consecutive Dates

Mar 30, 2007

how to achieve the following: I have a list of names and individual dates and what I would like to do is convert to a 'names' column, a 'to' column and a 'from' column where the the 'to' and 'from' columns are the dates that are consecutive weekdays (carrying over each weekend as well)?

View 9 Replies View Related

Consecutive The Dates

Aug 10, 2006

I received the answer on assigning consecutive dates but what can be done to
the formula

=INT($A$1+INT(ROW()-1)/30)

TO:

1. Not include weekends
2. Only assign the date to a certain person's name if there is multiple reps
on the spreadsheet.

View 14 Replies View Related

Count Consecutive Dates

Jul 25, 2009

I am a remodeling contractor trying to monitor trips my employees are making to the lumberyard. I am able to export to excel from our accounting program a column of dates that invoices are made and another column that tells me whether trips were made before 8:30, between 8:30 and 3:30, after 3:30, or whether materials were delivered involving no trip. So I can count "time of day" trips. I also want to know if multiple trips were made in a single day, or if trips were made 2, 3, 4, 5, etc. days in a row.

Column 1 Column 2
Monday, July 6 2009 Before 8:30
Monday, July 6 2009 Between 8:30 and 3:30
Tuesday, July 7 2009 Between 8:30 and 3:30
Wednesday, July 8 2009 Before 8:30
Friday, July 10 2009 After 3:30
Monday, July 13 2009 Before 8:30
Wednesday, July 15, 2009 Before 8:30

In this example, I have 2 trips made on a single day; 1 instance of trips made 3 days in a row; 1 instance of trips made 2 days in a row (Friday, and then again on Monday since we don't work weekends) and 1 instance of 1 trip made on an isolated day. Additionally, we have 4 trips made before 8:30; 2 trips between 8:30 and 3:30 and 1 trip made after 3:30. Columns for a single job could range to 30 or 40 trips or more, and we have 6-12 jobs running at any one time, so I could be looking at data for all of those jobs once a month if I can figure out how to make it easy to do. I have figured out how to count up the time of day trips (but included the example here for a fuller picture of what I'm trying to do) but cannot figure out how to count the number of 2,3,4,5 etc.-day-in-a-row trips that are being made.

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

Auto Fill Dates In Consecutive Order

Jan 12, 2014

I am trying to do a column full of Month,Year dates in consecutive order (i.e. Jan 14, Feb 14, Mar 14, Apr 14, May 14.)

View 1 Replies View Related

Counting Consecutive Dates As A Single Occasion

Jan 8, 2010

I'm trying to do is to get Excel to look at the dates and, if they are consecutive (Fri - Mon inclusive is also counted as consecutive) I need Excel to tell me that this is one occasion. It then needs to count each seperate occasion.

I've attached an example with each different occasion colour coded. In the example there a five occasions. Thus the Bradford Factor would be 187.5 (5*5*7.5).

View 2 Replies View Related

Count Of Consecutive Dates As Single Occasion Per Patient

Jun 2, 2014

I couldn't figure out how to change this function to allow for weekends.

Function to count consecutive dates as one occasion
=--((NETWORKDAYS(SUM(c1)*(B1=B2),c2)-1)>1)
Column A Column B Column C Column D ( I would then use this column in a pivot table to calculate)
pat name pat id date of service # Admissions

[code]....

View 4 Replies View Related

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

Reading In CSV Files

Nov 13, 2009

I'm using the following code to read in any number of CSV files into a single worksheet and concatenating them together

View 2 Replies View Related

Reading Data In Each Row

Mar 4, 2010

I'm trying to write code that looks at the range W(rowid):Z(rowid) and lists each cell value in a listbox. The row id is coming from the listindex of combobox1. I know the rowid part is correct and working because other operations in my worksheet are using it fine. Here's what I've written so far:

With Worksheets("DATA")
For I = 0 To 4
ListBox3.AddItem .Range("W" + I & rowid)
Next I
End With

View 9 Replies View Related

Reading Same Data In Different Sheet

Jul 17, 2014

In sheet 1 data 123. In sheet2 there is also data 123. In sheet3 will automatically data that is same 123 after reading sheet1 & sheet2. Any data with figure that is same in sheet1 and sheet2 will be reading in sheet3.

View 4 Replies View Related

One Cell Reading From Different Locations

Dec 1, 2008

the attached workbook, I am looking for M19, N19 & O19 to read from different locations depending on how many cells are called on when info is entered in P8.

View 10 Replies View Related

Reading All Folder Names

Feb 6, 2014

I want to read all the folders names in a folder.

So for example c:win estfolder

And in test folder there are 5 more folders named test1,test2 etc.

I want to be able to give the path c:win estfolder and let VBA excel read all the names of the folders inside the folder testfolder.

I have found some methodes on the web, but those are for files like .txt etc.

View 3 Replies View Related

Reading One Character Of Text

Apr 18, 2009

The following code reads text one character at a time, and each character is determined either to be a blank space or to be any other character. If it's determined to be any other character, then the character is added to the active cell. If it's determined to be a blank space, then the active cell becomes the cell one column over. The idea is to have different words written in columns next to each other.

The sample text file I'm reading from reads: "text file". The file has only those two words. One space between them. No space before the first word, and no space after the second word. The following code compiles and runs. BUT the result is that the word "text" is in column k, not A. And the word "file" is in column J, not b.

View 2 Replies View Related

Reading From Drop Down Lists

Jan 11, 2010

I have a drop down list in my excel sheet that contains names of manufacturers. What i would like to do (using vba) is display some details of each manufacturer that will be copied from a different sheet.

So my question is, how can i read the string from the drop down list on one sheet and then copy a cell from another sheet.

View 8 Replies View Related

Reading Row Numbers In Database

Mar 5, 2012

I am building a data base. I have a tab where you fill out of a form and then click an activeX command button to write to the data base. I am wondering if there is a way to record how many times to button is pushed. Each time the button is pushed, I want to record the data from the form into a single row in the data base without writing over old data but I do not know how to read how many rows of data are already there.

View 9 Replies View Related

Reading Text From Right To Left

Feb 7, 2007

I am using the find or search function but I need to read my text string from right to left (from the end of the string, instead of from the beggining). Is there a way to do this?

View 9 Replies View Related

Error When Reading Checkbox Value

Mar 21, 2007

I have a spreadsheet with about 200 lines or records and I have added a checkbox to the end of each record. I need to the code to check the checkbox on each line to make a decision on how to process the data, but I do not want to read in a True or False value for 200 check boxes in every step of the loop. I think I'm close but I can't get the following to work...

This is basically what I want:

For i = 1 to x Step 1

IF me.Shapes("Checkbox" & i).Value = True Then

'Perform Action

END IF

Next i
I get an error when I hit the IF me.Shapes..... line

"Object doesn't support this property or method."

View 9 Replies View Related

Reading Into Merged Cells

May 15, 2007

I have a table where sometimes cells are merged. To the right they are not merged, but I need to link to the value of the merged cell. How can I do it if I don't want to do it manually?

Example:
Say A1:A4 is merged, A5 is just normal. I want a formula using those values, say in B1:B5. Now just filling down the formula would reference A1, A2 and so forth. This is wrong.

View 9 Replies View Related

Reading From Clipboard Before Pasting

May 28, 2008

Is it possible for VBA to read data from a clipboard so that it knows what sheet to paste the data to? Currently we run a financial tool and 2 reports are ran and I put in a bottom so users could easily just paste special values into the correct place. Sometimes the users forget if they copied the balance sheet data or income statement data and currently its not a big deal because there are no columns to the right of where it is pasting so it isn't screwing anything up and they just delete the data and paste it to the correct sheet.

I have thought of 2 approaches I am going to take, but started to wonder if one could read the data from the clipboard before the paste.

My 2 options would be:

Option 1. Paste data to newly created sheet and check if it is balance sheet or income statement and then move from newly created sheet to correct sheet and delete newly created sheet. The user wouldn't see any of this because I would disable screen updating.

Option 2. Learn how to use Undo within my VBA or keep the Undo cache with items in it as it typically clears when VBA is executed. That way if they paste it and it is wrong I can just undo the VBA paste.

Option 1 I am confident I can handle. Option 2 I can research and feel I could do, but if it comes a time when a sheet has data I do not want to paste over then this option is no good.

I would like to hear any comments or feedback on this and if it is possible to read data off the clipboard so it knows where to paste.

View 9 Replies View Related

Reading A .txt File In Excel VBA

Jul 5, 2008

I need a little bit of help here ... I can read and process a .txt file from my Excel VBA program, but I am having trouble as follows :

The file I am reading contains a number of heading lines, followed by a number of data lines.

All of the data lines end in a date, so I can use the code ...

If IsNumeric(Right(MyDSRec, 1)) Then
... to pick up the data lines & ignore the heading lines. This is fine and works perfectly.

However, the .txt file that I receive is out of my control, and is prone to error, in that the data line occasionally has what I assume is a "Tab" character after the last date, which means that the line above does not recognise the last character as being numeric.

If you double click "06" at the end of each line on the example below, you should be able to see what I mean (in the .txt document, if I place the cursor at the end and press backspace, all characters at the end are deleted, back to the 06, so they are not individual spaces) ...

RAMSEY1129/0503/0603/0613/06
SHAKESPEARE 1102/0609/0609/0618/06
PREMIER603/0604/0605/0618/06

View 9 Replies View Related

Reading Binary File Bug

Jun 16, 2006

I am running into one of the strangest issues I have seen in a long time. I have a user defined type that I utilize in VB6 and write out to a binary file....

View 7 Replies View Related

Reading Values Into An Array

Jul 31, 2006

I am have a 4x2 table and would like to use the values in the table in numerous procedures. i feel the best way do to this is to record the table as an array and be able to 'paste' or call the array anytime i need to. However, i am unable to read the table into an array.

1. how the array works,
2. how i can read values into an array and
3. how can i 'paste' or call the array at a later stage.

View 4 Replies View Related

Reading A Cells Value And As A Range

Jan 7, 2007

I'm trying to use the contents of a cell as a range in my code

Private Sub CommandButton3_Click()
Dim Target As Range
'the cell containing the contents i want
Range("P11").Select
Target = ActiveCell.Value
Range("P9").copy Target
End Sub

Does it read in the value as a string? If so how do i get around this?

View 2 Replies View Related

File Name Reading Through Macro

Apr 4, 2007

i am trying to read the file name in a specific folder through macro of my EXCEL application. i wondered that it is reading that file name in all Lower case.
Ex: the file name in the folder is "Ford of Pompano.xls" when i am reading that name from macro, it is giving me as "ford of pompano.xls". Do i need to change any default settings in EXCEL so that it can read the files names what ever is presend in the folder

View 3 Replies View Related

Formula Not Reading When Employee Shift Changes

Jan 24, 2014

I need a formula that will be able to show what shift someone is on if the shift changes, for example. if one of my employees shift changes from and 8hr to a 10 hr on january 16th 2014 then I would like the raw sheet to show the old shift, the new shift and when the new shift started (date). the index formula I have will only show one shift even if there are new dates with a different shift. the formula pulls from the sheet name editor.

i really want the shifts to be different if it was change on a certain date then from that date the employee shift will reflect new shift but still keep the previous shift prior to the day the new shift started.

I've attached a sample workbook to show.

MDT Report December 201322(FILEminimizer).xlsx

View 2 Replies View Related

Reading Non Numeric Text In A Cell

Apr 1, 2009

SUM(IF(FREQUENCY(E10:E29,E10:E29)>0,1)). this is the formula I currently use to read employee numbers and it works when we just use the number i.e. 011004. When we use the full employee number with alpha characters it does not work i.e. ASMO011004. I have used helper cells to do similar, but am not wanting to do this way for simplicity reasons.

View 2 Replies View Related

Reading Numbers As Strings From .csv File

Jan 7, 2010

I have a .csv file that contains numerical data in the form of strings, much of which starts with leading zeros (i.e. "012345"). I double checked to make sure the .csv file has the leading zeros and that they are wrapped in quotation marks in notepad, and it does. However, when Excel opens the file, it must read those strings as numbers, becuase it chops off the zeros. Does anyone know of way to fix this? Can Excel read numbers as strings straight from a .csv file?

View 3 Replies View Related

Error Trapping When Reading From Another Workbook?

Jun 3, 2014

I'm using VBA to open several files and pull information from them into a workbook with the hopes of eventually outputting the information to a formatted text file that can be uploaded to a data transfer system that will fill out a form for me. The problem I am finding is that the workbook that I need to access has faulty VBA code that executes everytime the workbook is opened. I realize the easiest solution would be to fix the code that is faulty however the workbook that I am accessing is automatically generated for each product with the faulty code embedded requiring me to handle the error on the back end. Attached is my code and I attempted using error trapping to handle this issue but I've concluded that I either lack understanding of error trapping or the fact that the error is in a cascaded workbook complicates the error trapping code.

View 5 Replies View Related







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