Delete Row That Have String Of Wednesday

Feb 1, 2014

VBA code to delete all rows that have the day string of Wednesday

The weekdays are in column C2:C?????

View 8 Replies


ADVERTISEMENT

Formula Returning Following Wednesday

May 8, 2014

I need a formula for cell P5 that returns the date for the following Wednesday from a date in cell I3?

For example, if in cell I3 01/05/2014 (through to 06/05/2014) is entered, cell P5 should show 07/05/2014

If the Wednesday date is in cell I3, cell P5 should should that same date (e.g. 07/05/2014 in cell I3 and P5).

View 3 Replies View Related

Calculate Third Wednesday Of Month Plus Interval

May 21, 2013

For any given year, I would like to calculate the date of the third Wednesday of each month for that year, plus the interval (in weeks) between two consecutive months (Which will be either 4 or 5).

Example:
Enter 2013 in cell A1
Output would be:
A2 - Jan 16
A3 - Feb 20
A4 - Mar 20
A5 - Apr 17
..
A13 - Dec 18

AND

B3 - 5 weeks (interval Jan-Feb)
B4 - 4 weeks (interval Feb-Mar)
B5 - 4 weeks (interval Mar-Apr)
..
B13 - 4 weeks (interval Nov-Dec)

View 2 Replies View Related

Formula Return Following Wednesday Or Friday Date

Jun 10, 2008

Need a formula for cell J27 that returns the date of the following Wednesday from a date in cell J2 that's a Wed, Thurs, or Fri
or
return the date of the following Friday for a date in cell J2 that's Sat, Sun, Mon, or Tue.

For example, when 05-29-08, a Thursday, is entered in cell F2, I need cell J27 to return the following Wednesday's date of 6-04-08.
or
For example, when 06-01-08, a Sunday, is entered in cell F2, I need cell J27 to return the following Friday's date of 06-06-08.

View 9 Replies View Related

Excel 2003 :: Week To Date Running Hours Worked Totals - From Thursday Till Wednesday?

Jun 12, 2014

I have two columns with total hours worked at different places and a grand total for both together in a third column.

I'm trying to sum the total hours for the week so far from Thursday till the following Wednesday for each week.

I want the wookbook to look up todays date and tell me what the total hours are for the current week

I'm using Excel 2003 - see the file attached

View 14 Replies View Related

Select Based On Partial String Then Delete Based On Full String?

Jun 13, 2013

Working with a scheduling report and trying ultimately to get it down to a line item report with the associate information and their earliest start and latest end for the week. Already made a lot of fixes to the formatting involving junking empty cells and trash data, but running into a road block on some of the trash data.

Here is the format of the report at this point. Names have been changed to protect the innocent.

Agent: 2366 Bacon, Kevin

Date
Start
End

[Code].....

So what I need is something that will iterate through the report...such as an while and find the cells in column A that start with "Agent:" It needs to compare that cell to a stored value to see if this "Agent:" is a repeat. If it is then it needs to delete that row and the next one and shift up. If it is not then it overwrites this "Agent:" with the previous one in the stored value and continues the while.

I know what I want to do...but not shure on the code cause I am not great at VBA.

Oh...if it matters probably need to allow for about 10k line items to iterate through...right now report is at 6k...but allow room to grow.

View 6 Replies View Related

Delete X Row If String Found?

Apr 28, 2014

I am currently using this macro for deleting a row if a string is found:

[Code] .....

But I would like to be able to not delete that row, but also to delete the 13 row above that row, including that row too.

ROW 1
ROW 2
ROW 3
ROW 4
ROW 5
ROW 6
ROW 7
ROW 8
ROW 9
ROW 10
ROW 11
ROW 12
ROW 13
ROW 14 - NO MONEY

All this from No Money up to Row 1 will be delete, and loop.

View 3 Replies View Related

Delete Row If Cell Does Not Contain Certain String

Oct 23, 2013

I want a macro to look at column G and if a cell in column G does NOT contain "Test Case" anywhere in the cell then delete the row. So for example G5 might be "Test Case/Others" - I would not want this row deleted.

View 3 Replies View Related

Delete String Before Some Character?

Dec 21, 2012

I have some columns in the excel file:

/path1/xyxxx/cccccc/filename12.txt
/path1/bxgdgg/gfdfacc/filenameeee8.txt
/path1/tttwrw/ccefecc/ddddd/filename56.txt

And I would like to delete everything before the LAST slash(just filenames)

filename12.txt
filenameeee8.txt
filename56.txt

View 2 Replies View Related

Search For String And Delete Row And Next Row Down?

Apr 23, 2013

I trying to search for a string in Excel and then delete that row. The code below will do that but I am also looking to delete the next row line out as well. .

Dim ws As Worksheet
Dim lRow As Long
Set ws = ThisWorkbook.Sheets("DSS")

[Code]....

View 2 Replies View Related

How To Delete All Zeros In A String

Dec 11, 2007

I have data (strings) which looks like this:

000000000001000
000000000392000
000000000003000

no I want to write a routine which delets all zeros from left to right untill the first "normal" number appears.

Result:

1000
392000
3000

View 9 Replies View Related

Delete Periods From String

Dec 29, 2006

I am having trouble writing a Macro to delete multiple periods at the end of each cell. Each cell looks simiar to this: Blah Blah Blah................... I am using the InStr function to find the first period but it returns a 0 everytime. Here is the code I used to find the period. I want it to delete everything after the first period and store the value back in the same cell. Right now it just stores blanks.

Sub PeriodRemover()
Dim NewContract As String, Contract As String
Application.Calculation = xlManual
i = 2
Sheets("Product Listing by Contract").Select
Contract = Range("A" & i).Value
Do Until Contract = Empty
NewContract = Left(Contract, InStr(Contract, "."))
Range("A" & i).Value = NewContract
i = i + 1
Contract = Range("A" & i).Value
Loop
Application.Calculation = xlAutomatic
End Sub

View 4 Replies View Related

Delete Entire Column If Row Has Certain String?

May 5, 2014

I have fixed headers on row 16, from columns A-AC.

I want to be able to delete the entire column, if the row has a certain string, such as "Chart ID" .

I also want to expand it to include other strings such as "Month" and "Source" . So if it contains any of these words, the columns should be deleted. It should be an exact match (as other headers contain the word "month").

View 12 Replies View Related

VBA To Delete Part Of Text String

Aug 15, 2014

I am trying to delete part of a text string for a range of cells. The code I have so far deletes the first set of letters but is looking in every cell in the range.

Ideally I would like it to only look in the cells of col B where there is data then only delete the first 10 letters if the cell begins with "Service ID"

Sub DeleteServiceID()
Dim c As Range
For Each c In Range("B1:B1000")
c.Value = Right(c.Value, 10)
Next c
End Sub

View 4 Replies View Related

Delete Specific Word From String

Feb 12, 2009

I want to delete a specific words from string but i have a problem with the code below. For example, i wan to delete the word "Inc" only but the problem with my code is that it is deleting from "Incorporated" too and i want only the code to delete only if it finds the word "Inc" only.

View 11 Replies View Related

Find Part Of String And Delete

Feb 25, 2009

Find part of string and delete. I have the following type of string:

View 4 Replies View Related

How To Find And Delete Columns Containing A String

Apr 18, 2014

I'm looking to loop through a worksheet with over 1000 columns and would like to delete columns containing a percent sign (%) in the header row which is row 4. Column range to search would begin at column 12.

View 4 Replies View Related

Delete String After Last Space In A Cell

May 4, 2007

I am interested in some sort of macro or formula that will strip all of the characters in a cell that come after that last space. My difficulty lies in that the string isn't a constant character count nor is the string always the same.

American Legion Post 8754 Hartford
YWCA Canton

I would like for it to say:
American Legion Post 8754
YWCA

View 10 Replies View Related

Macro: Delete Rows That Do Not Contain The String

Feb 26, 2008

There are probably simple solutions to these problems but I'm fairly new to Excel and i have spent far to much time trying to figure this out.

I need a macro that will delete rows that do not contain the string "QC"

Only column A is populated and "QC" is always at the start of the string followed by a space then more characters.

I would also like to delete the contents of the remaining cells (cells that do contain "QC") with the exception of the 5 characters (inc space) immediately after "QC"

For example, these 3 cells:

QC 4860 MF 25/01/08 1713 DateUtilsAH F 25Jan2008 VbV defect 4842QC 4529

Would become:

QC 4860
QC 4529

View 10 Replies View Related

Delete Entire Row If Cell Contains String

Jan 30, 2008

I need to write a macro that will search column A and find the word hospital or HOSPITAL and if found delete the entire row. The code I have below will do this ONLY if hospital or HOSPITAL is the only word in the cell. However in my column A there are numerous words in each cell i.e Saint Mary's Hospital.

Sub KillRows()
Dim rngNew As Range
Dim rngDelete As Range
Dim aCell As Range
Dim lastrow As Long
Set rngDelete = Nothing
Set rngNew = Worksheets("Sheet1").Range("A1", Range("A65536").End(xlUp))
rngNew.Select
For Each aCell In Selection
Select Case aCell.Value...........

View 5 Replies View Related

Delete Middle Part Of Text String

Mar 30, 2009

I am looking for a formula to delete information from the middle of a text string. I have ~ 1,000 lines of data. Each text string is composed of the same way. The data I am looking for is two parts of the string (1) all the text up to and including the first “%” character (2) the last six characters.

Raw Data
CARDINAL HEALTH 5.5%13CARDINAL 5.513 CARDINAL HLTH 5.5 061513
UST BILL 0%09US TREAS BILL 0%09 UST BILL 0.0 092409
WORLD SAVINGS 4.125%09WORLD 4.125%09 WORLD SVGS 4.125 121509
JP MORGAN 5.375%12JP 5.375%12 JPMORGAN CHS5.375 100112

Desired Result
CARDINAL HEALTH 5.5% 061513
UST BILL 0% 092409
WORLD SAVINGS 4.125% 121509
JP MORGAN 5.375% 100112

View 2 Replies View Related

Delete A Cell If It Contains Specific Text String?

Oct 19, 2012

I need A VBA that will delete a cell if it contains a specific text string

As long as the cell content is deleted, I can do the rest that needs to be done.

View 4 Replies View Related

Delete Row Based On Partial String Criteria

Dec 10, 2009

I have 2 columns A and B. The data is in column B.

What I'm trying to do is delete entire rows from my current selection if they do not begin with mailto:

View 9 Replies View Related

Find And Delete Quotation Marks At The End Of A String

Feb 24, 2007

I'm using a query that dumps information into Excel. The query automatically creates a formula in each each cell. For instance if the first value in the query showed FUNSTUFF, after dumping it into Excel, the contents of the cell would show ="FUNSTUFF". I can just use a find and replace to get rid of the leading =", but sometimes the values of the cells are supposed to have a quotation mark, so using the same method to remove the trailing quote won't work. I need a way to search each cell, check if the last character in the string is a quote, and if it is, delete it.

View 5 Replies View Related

Delete Row If Cell Text Matches Known String

May 21, 2008

I have an excel file, and on some rows, the "B" column contains the text " Total:" (it does have a leading space). I would like to loop through the first 200 rows (maximum length of the file) and delete all the rows that contain " Total:" in column "B". I have tried:

For i = 1 To 200
range("B" & i).activate
If range("B" & i).value = " Total:" Then
rows(activecell.row).select
selection.delete shift:=xlUp
End If
Next i

When I step through that code, it just skips over the IF function as if B1 does not equal " Witness:"

View 3 Replies View Related

Excel 2010 :: Find String And Delete Column On All Worksheets

Jul 9, 2014

Why my code is not working. I am working with Excel 2010. It will only delete the column on the active spreadsheet and not go to next worksheet. Not all worksheets contain the word "Broker".

[Code] ......

Not sure if its something to do with Activecell, try After:=ws.cells(1,1) or passing it in as the active cell stays the same i think.

View 3 Replies View Related

Delete Rows If Column Has Fewer Than X Matches To Part String Match

May 5, 2008

I have data sets on multiple worksheets within a workbook (over 70). Based on the begining of a string, I need to count all instances with that begining, and if there are fewer than 12 instances, delete the entire row.

Data set example:

In this example, I need to count each instance of rows starting with 1/* - 9/*, and delete rows as mentioned. In other data sets the string might start Gi1/*, and so on. In the following code, if I do not loop, and only test against 1 value type, and ONLY run it once, it works. As soone as I try to loop through all possibilities, or run the macro a second time, it blanks out the entire worksheet, starting at row 3.

Dim c As Long
c = Worksheets(i).Range("A" & Rows.Count).End(xlUp).Row
With Range("A3:A" & c)
If Application.WorksheetFunction.CountIf(Worksheets(i).Columns(1), "1/*") < 12 Then
. AutoFilter field:=1, Criteria1:="1/*"
.Offset(1).Resize(.Rows.Count - 1, 1).EntireRow.Delete
.AutoFilter

I have also tried to concatenate a variable with my CountIf criteria, but that fails miserably.

View 6 Replies View Related

Delete Row If Cell Contains Certain Text As Part Of Text String?

May 15, 2014

I have a column of data with letters in each cell, no numerical, only alpha. Now, some of those cells contain the letters "adj sub" as part of the text string in each cell. "Adj sub" is always at the beginning of the text string. As an example, a cell will look like this - "adj sub mhm". I want to delete rows whose cell description does not contain "adj sub" as part of the text in the cell.

View 5 Replies View Related

Delete String Before Last Colon If No Text After Last Colon

Nov 29, 2012

I found the following formula on another site that deletes all the text before the last colon (it deletes the colon as well)

=TRIM(RIGHT(M2,LEN(M2)-SEARCH("@#",SUBSTITUTE(M2,":","@#",LEN(M2)-LEN(SUBSTITUTE(M2,":",""))))))

Is it possible to modify it so that it only triggers if there is nothing after the last colon?

As you can see in the example below I have some notes entered by users and I would like to delete the ones where they didn't actually enter a note after the last colon:

11/05/2012 13:19:53 NEW MIKE : cld poe male sd cu not in till 3pm
10/18/2012 08:03:55 NEW HOSSEN : called no answer
10/15/2012 11:15:41 NEW HOSSEN :
10/12/2012 08:00:26 NEW HOSSEN :
10/11/2012 12:17:14 NEW HOSSEN : called no answer
11/14/2012 13:42:07 ACT MIKE : cld poe spk to cust sd cm back at 330

I would like to be left with just this instead:

11/05/2012 13:19:53 NEW MIKE : cld poe male sd cu not in till 3pm
10/18/2012 08:03:55 NEW HOSSEN : called no answer
10/11/2012 12:17:14 NEW HOSSEN : called no answer
11/14/2012 13:42:07 ACT MIKE : cld poe spk to cust sd cm back at 330

Link to article I found this formula in : [URL] .....

View 2 Replies View Related

Excel - UDF That Returns String Of Multiple String Objects / Possible To Color Font?

Sep 19, 2012

I have a udf that returns a string to the cell. The string is made up of multiple string "objects". What I am wondering is if I can set the font color of certain objects so that when the final string is built and returned, the font of those portions is set.

Ex. of simple idea (this is not actually my code, just a way to illustrate. I realize there is no point to this UDF):

VB:

Function StringReturn (Str1 As String, Str2 As String, Str3 As String) As String
StringReturn = Str1 & Str2 & Str3
End Function

Now what if I wanted Str1 and Str3 to be blue, and Str2 to be red for example. So that when the UDF calculates it would return: Str1Str2Str3

View 2 Replies View Related







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