Skipping Certain Dates
Feb 9, 2010I have the following code that sorts dates for me, the only problem now is that I need it to leave any row untouched that has todays date or any date in the past in row G.
View 3 RepliesI have the following code that sorts dates for me, the only problem now is that I need it to leave any row untouched that has todays date or any date in the past in row G.
View 3 RepliesI need to make a schedule for testing where I check the samples every 3 days but if that date hits on a weekend I want it to role over to the monday if it hits on a Sunday and Friday if it hits on a Saturday. In other words wait an extra day if it hits on a Sunday and check the sample a day early if it would normally be on a Saturday.
I have been playing around with the WORKDAY command and some of the other date functions but I can't figure this one out.
I have the following coding that I have tried in both the Sheet code and as a module at different times.
Sub CopyEmployed()
Sheets("Employment").Select
Range("A3:L200").Select
Selection.ClearContents
Range("D4").Select
Sheets("Act1").Select
- And there will be more here when I can get this first part working-
When I step through this works up to "Selection.ClearContents" but then ignores the next two lines
Range("D4").Select
Sheets("Act1").Select
and goes straight to the Private Sub coding below that I am using to change the sheet tab names (This is in the ThisWorkbook section and works perfectly)
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim LinkedCells As Range
Dim ArrayOfMatchingSheets As Variant
Dim i As Long
Set LinkedCells = Sheets("Menu").Range("E8:E22")
[Code] ....
I can continue to step through this until it eventually returns to
Range("D4").Select
Sheets("Act1").Select
It may then run the remainder of the coding but what I have tried so far produces more Runtime and type mismatch errors which I will post after I can fix this.
Bottom line is I dont want the change sheet tab code run - I need the remainder of the Sub CopyEmployed() to run.
How Can I Mkme Count for range A1:D100 And Skipping One Row
For Ex
Count Row A1 And Skipping Row A2 etc,
I'm currently working on a report and what I'm trying to do is get a Row of information to pull into 4 rows. My current formula looks like this:
=INDIRECT("'Paste SAP'!H"&IF(MOD(ROW()-1,4)=1,ROUNDDOWN(((ROW())+3/4),0)," "),1)
I change the bolded number to correspond to which row (1,2,3,0) but it's not functioning. I've done it with other but for some reason this one doesn't work. I've attached the template so you can see what it looks like. The problem is with the SAP Tab and the info from the Paste SAP tab.
I am trying to get excel to autocount starting in a7 and ending at a600, skipping 3 rows in between, and only gng from 1-10 then repeating and inserting a page break after the 10th line i have put an example in.
SAMPLE1.xlsx
I am working on an inventory sheet. Its probably only complex due to the amount of data. There are several hundred locations we service and these are in a single column, and then there is the equipment we use that is several hundred columns.
Each location uses 3 rows and the 1st needs the formula to equal 2 rows beneath it. i.e. cell E28 has the formula =E30. I basically need to fill down, but only put that formula into every 3rd row, as the two rows beneath this row need to stay blank, or show number i manually put into either.
The second part of this, is there a way once that is done, to just select those cells, and fill to the right all the way? Again, i do not need to fill the two rows under that one.
I have attached part of the sheet .....
The green cells are the ones that need the formula, and those will be copied down, and right. the others need to be left alone. I have been sitting here for an hour manually entering in the =XXX for each cell.
creating a formula that will automatically bring the cursor to the next applicable cell. We have template wherein there are extra cells in between those that we fill out. What I wanted to happen is for the cursor to go directly to the next cell that I need to fill up.
Example would be that cell a1 is where we type the name then the next cell will be c1where we will put the addreas. How will I make the cursor jump to c1 when ive filled in a1.
How you can find the min with simpler ranges, but my equation doesn't work with what I've found so far. I want to skip the zeroes and blanks.
=IF(AC44>0,(MIN((FS13+FL13),(FS18+FL18),(FS23+FL23),(FS28+FL28),(FS$417+FL$417),
(FS$422+FL$422),(FS$427+FL$427),(FS$432+FL$432))) ,)
I'm looking to easily drag the sum of certain cells in a different column BUT keeping a specific range, it's hard to explain so i'll show an example...
A1
A2
A3
A4
A5
A6
A7
A8
B1=SUM(A1:A4)
B2=SUM(A4:A7)
B3=SUM(A8:A11)
And so on...
Is there any way I can do this by dragging down the cell formula from B1 and it remembering the range of 4, so I don't have to manually select each range...?
I have a dataset where I have 1 row for one person with different information, I would like to turn this into multiple rows eg,
Henry 37 Likes Peanuts Brother George 24 likes tomatoes sister Sarah 21 likes olives
into
Henry 37 Likes peanuts
I'm trying to total up some rows that are put in a repetitive order repeat. I can do this, but the method I'm using is highly inefficient. Is there some slick equation I don't know about?
Example below:
Worker 1 - Double Time - each of these has 200 columns for different job codes
Worker 1 - Over Time
Worker 1 - Regular Time
Worker 2 - Double Time
Worker 2 - Over Time
Worker 2 - Regular Time
Worker 3 - Double Time
Worker 3 - Over Time
Worker 3 - Regular Time
...and so on to 1000 workers
Total Double Time - for each job code
Total Over Time
Total Regular Time
A00956
ABT
DUK
CASH-1
The above column is in a spreadsheet I am working on. I would like to write a formula that looks at this column and returns all of the cells that are not blank (ie: A00956, ABT, DUK and CASH-1) I don't know how to have the formula skip the blank cells (the cells are blank but not empty).
i am useing colmn a only for input,
starting from cell A5 to the end of A,
so as i input data starting form cell A5 the active cell automaticly moves to the next row A6, so i could input another number but after ten rows it should skip an extra blank row and start this all again
but thats not the only prob, starting from cell B5 should count every ten rows and give it a number starting from 1,2,3,4... and no number should be on the blank row.
a b
5 223 1
6 234 1
7 987 1
8 787 1
9 976 1
10 324 1
11 345 1
12 455 1
13 247 1
14 685 1
15 ......................
I was working on a project this morning (I actually got help here but this is more or less unrelated) and ran into a strange problem. It seems the For loop that I was using is skipping cells.
Was trying to figure out the problem using this macro and a list or random garbage.
Private Sub CommandButton1_Click()
Dim number As Integer
For Each Cell In Range("A2:A500")
number = WorksheetFunction.CountIf(Range("A:A"), Cell.Value)
Cell.Offset(0, 1).Value = number
If number > 1 Then
Cell.EntireRow.Delete
End If
number = 0
Next Cell
End Sub
Maybe someone who actually know something about programming can straighten me out.
If ur using VLookup, can u tell it to skip the first result and find the second result and return it?
View 5 Replies View RelatedI have this example data range:
foo 3
goo 2
blu 5
I'd like to be able to chart this (clustered columns for instance) but when I delete value 2 from goo, I'd like the chart to skip that row altogether and not display "goo" and a blank space as its value. I only want foo and blu columns showing.
Is that possible?
I have Names in column A, Data in Column B. Example
A1 John B1 1000 C1 5:32:05
A2 Jim B2 500 C2 5:56:55
A3 John B3 600 C3 6:45:65
A4 Bill B4 300 C3 7:21:05
In another column I have the names of all the possible people that I will need data from and next to them I will need a formula to tabulate all their totals from column B and then another formula that will skip B and total column C's total.. I have a formula that I used from awhile ago when I needed to offset the data but I can't figure out how to just take the data to the right of it and then another formula to skip column B. Here is my old formula =SUMPRODUCT(($A$1:$A$291=G14)+0,OFFSET($B$1:$B$291,1,0)+0)
On the attached example there is a button called 'unsettled hedges', click this and it loads a userform. In this example, there are 10 rows of data that want a value entering into the 'returns' textboxes.
If you try to enter a value into all of the 'returns' textboxes and click the 'settle hedges' button then all the values from the textboxes should against the relevant row in column L of the 'unsettled hedges' worksheet and then each of these rows should be copied to the next available row in the 'settled hedges' worksheet.
This isn't happening though, instead, it is copying across every other row from the 'unsettled hedges' worksheet, leaving half of the rows still on the unsettled hedges worksheet.
I am trying to write a macro for an autofilter which is triggered if an optionbox or checkbox is selected, i.e. Value=True. What is happening is that when the either box is selected it filters fine, but when it is unselected, the data is still being filtered using the previous results. My question is how do I write a macro that will skip a filter macro if the value=false. For instance, can I write an if then statement which will either skip the macro all together, or filter the data in that particular column as (All)?
Here is what I am working with so far, but it's not working.
Private Sub optlc_Click()
If optlc.Value = True Then
Worksheets("Sheet2").Range("B1").AutoFilter _
Field:=2, _
Criteria1:="y"
[Code] .......
I have a spreadsheet containing a column of dates which I use as the data source for a mail merge. I need to convert the dates in this column from the format "18/02/08" to the format "18 February 2008" using Format - Date.
Problem is where the dates are missing the leading zero, Excel will not change these e.g. 3/2/08. Converting to text first did not fix it.
im trying to copy a data--paste special--transpose--
i want this data to be copied in a manner, tht the 1st entry skips 3 rows and then comes the next value??
i have table in the left side and i want to get the results in the table in the right side skipping blanks row price with taking in consideration blanks are formula contain ""
[IMG][/IMG]
Attached is a sample spreadsheet. Please look at the spreadsheet will reading this post, as it would be rather confusing otherwise.
From this spreadsheet, I need to create two new spreadsheets (I assume one at a time is best). One (S1) will contain data from rows where Column C = "Regular Hours". The other (S2) will contain data from rows where Column C <> "Regular Hours".
The format of S1 (3 columns) is: Payroll # (Column B), code for the type of hour (this code I will need to write into the VBA code), the number of hours (D:G,Q:T,AD:AG), and the constant "N".
The format of S2 (4 columns) is: Payroll # (Column B), code for the type of expense (this code I will need to write into the VBA code), the dollar amount (I:P,V:AC, AI:AP), the project (Column C), and the constant "N".
The trick is each row on the new spreadsheets can only contain one hour/expense (otherwise this would be easy!). So, I need to loop to copy/paste the right cells, and need to skip over blanks, and need to end at column AP, then continue to the next appropriate row. As well, columns H, U, and AH are not used on the new sheets. I have another spreadsheet slightly similar to this with looping, but it is a delete type loop, not a creation one, and it doesn't have to have seperate rows like this does. I know this one is a bit big, but I know someone out there can figure out some looping code that can handle this.
Sheet1 has info in column a, b, c, d, e.
I want to paste these value into sheet2 but sheet2 has columns b, d hidden.
The paste end up putting the values in the hidden columns.
Is there a way of pasting a speacial so that the hidden columns are missed and i get the paste to go into colums a, c, e, f, g WITHOUT code?
I need to create a table with the top 14 'ReNo' for each code listed in columns F1-R1. These need to be in chronological order. Also if the code is part of the latest date then that first ReNo. needs to be ignored (since it will not have completed its cycle).
getting to the formula I have but I can't get it to sort in these ways, so as it is its not working right.
Example3.xlsx
I have this calendar with a total of 31 staff assigned. I need to assign two staff to cover each day not grayed out utilizing the staff tab from the top (A1) to the last (A31). Need to go to next name if blank.
Example:
Bob
Bill
James
Kathy
Should show
Bob
Bill
then
James
Kathy
not
Bob
Space
Bill
James
I would like to have the following fill down a column. =B5 =B7 =B9 etc. Is there a way to do this without doing it manually?
View 3 Replies View RelatedMy merged cells are not purely aesthetical - each merged cell (covering 6 rows in total, beginning at A3:A8) has colums and rows to the right for other details/formulae relating to that specific merged cell (which contains a customer account name).
The list I'm trying to reference is on a seperate tab - 'Projects' starting in cell A4. This list will have project names added to it, so I need my merged cells to reference the list, and subsequently pulling through all new additions to the list, rather than having to add them on a 2nd time.
I have a macro I run on thousands of rows of data which occasionally has incorrect line breaks that need to be brought up to the previous row. The macro works perfectly, however I'm trying to speed it up by skipping rows that do not need processing.
The macro inserts a check in column AQ to see if column A meets certain criteria. If it does not, "False" is entered in AQ, indicating the need for processing. As it runs now, the loop steps through each row of AQ to see if it needs further action.
I am trying to come up with a way for it to automatically just jump to "False" instances, skipping sometimes thousands of rows of blank cells that need no processing.
[Code] ......