Delete Row When A Selected Word Is In A Sentence

Oct 23, 2009

i have this macro that currently looks in column J and if a cell contains "Total" it deletes the entire row.

Now what i need is to check in same column but i need it to delete the entire row if any part of the sentence in a cell within column J contains "Main Total"



Sub Macro1()

'this deletes all rows if cell in column J says "total"

Dim DeleteValue2 As String
Dim rng2 As Range
Dim calcmode2 As Long

With Application
calcmode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With

View 9 Replies


ADVERTISEMENT

Replace Word In A Sentence?

May 14, 2014

I use the following code. I want to make Replace only in the case which there is a whole word in a part of a cell, but not in part of specific characters.

Example: In the code i want to replace the word "to" but replaces all the words that contains "to". For example in the word together lets only the characters gether, and in the word tonight lets only the characters night etc.

[Code] .....

View 4 Replies View Related

How To Extract Word From Sentence

Dec 20, 2010

I have data till 1000 rows. Every cell contain 1 sentance. I wanted to extract a specific word from that sentance. That word lenth is always 10 character and that word gets start with W0. e.g W012202911

View 9 Replies View Related

Extracting Word From Sentence

Dec 16, 2011

I have a huge collection of data where i need to extract out the lines that contain "hsbc" or "hbio"

E.g.
1) N0253 HBIO Corporate
2) N0082 HSBC Bank USA National Association

Basically, this data is in range C1:C500 and i need to place it into buckets so i.e. if the word contains HSBC then find out how many days it took to service, where "days to service" is in column AG

I can run the sumproduct....

View 6 Replies View Related

How Get A Word From Entire Sentence

Jun 19, 2009

I have 1 big sentance in cell A1 which contain one unique word starting with IE0025 or IE0027. I wanted to extract that word from entire sentance and this data is till 1000 rows. Not necessary that it will be in a constant position because always it get change to some other position within sentance.

View 9 Replies View Related

Capitalize Only Very First Word Of Each Sentence In Paragraph

May 31, 2013

I need to capitalize only the very first word of each sentence in a paragraph.

How can I do this?

View 8 Replies View Related

Copy Word From A Cell With Sentence In It

Dec 23, 2013

I am having trouble trying to write some code that will extract a word(s) from a cell that has asentence in it as can be seen below:(Class 4) (4yo+) 2m3f Heavy 10 hdles

I have tried Text to Columns but when I change from Race to race the amount of information changes and everything parts of words are chopped off and split into other cells etc. What iw ant is to be able to extract Class (Class4), the distance (2m3f) and the going (Heavy). I then want to copy that information from a worksheet called 'Meeting to a worksheet called 'Results'.

Much the same as above when a cell has:

Vinetta 16/1
or
Croco Bay (IRE) 16/1

How do I copy just the 16/1 onto the worksheet called "Results".

View 1 Replies View Related

Split Word From Entire Sentence

Feb 13, 2009

I have data in following order and wanted to split particular word from that.

for example : -

In Cell A1 i have address like N/A 12A, carbon court OSBORNE PARK WA 6017. I wanted to Split city name OSBORNE PARK & Post Code 6017 from that entire address in seperate cloumn. Like in cell A2 i want city name & in Cell A3 want Post code.

View 9 Replies View Related

Operator To Find A Word In A Sentence

Jul 26, 2006

I dont have much experience with VBA and im looking for an operator that helps me find a word (or part of a word) in a sentence located in a cell. I have to do this to create a user friendly form. I cant use the Find option in excel because i need to do this in a form.

View 3 Replies View Related

Extract Last Word Of Sentence Regardless Number Of Spaces

Nov 22, 2013

I've a list of names with different numbers of spaces, i would like a formula to give me the last name regardless the number of spaces...

is that possible?

List example:
Amelia Alexandra Correia Almeida

Maria Albertina Alves Moreira Figueiredo

Mario Miguel de Oliveira Azevedo Feitor

Carla Maria Bastos Soares
Carlos Sousa Teixeira

extract Almeida, Figueiredo, Feitor, Soares and Teixira

View 5 Replies View Related

Formula To Count Occurences Of A Word In A Sentence Within A Cell

Nov 11, 2009

I am after the formula to count the occurrence of, for instance the word 'the' in a sentence/paragraph that is contained in Cell A1. Cell B1 should return the quantity of times the word 'the' has been found in Cell A1.

View 6 Replies View Related

VBA - Using Entered Or Chosen Information In Excel To Auto-populate A Sentence In Word

Jul 2, 2014

For Example...

In Excel:

Question Answer
What is his Name? John
How many apples did he buy? 8
How much did the apples cost? 50

In Word: John is in cell b2, 8 is in b3, 50 is in cell b4

John bought 8 apples totaling $ 50 dollars.

Based on the information typed in the answer column (excel spreadsheet) I would want a word document to automatically generate a sentence.

View 1 Replies View Related

Input Text From Group List If Lookup Found Certain Word In Sentence

Jan 27, 2012

i have list in A2:A4 (description) and B2:B4 is the Group of.

now i want B2:B4 fill using E2:G2 (group list which is Animal, transportation and fruit) if one of the key word in E3:G5 found in A2:A4

A2: people like to eat apple
A3: car is very expensive
A4 : dog is human best friend

E2: Animal, F2 : transportation, G2: Fruit

E3:E5 = dog, cat, horse
F3:F5 = train, ship, car
G3:G5 = apple, banana, watermelon

result i want is :

B2 :Fruit,
B3 : transportation
and B4 is animal

View 3 Replies View Related

Macro To Find A Word In A Sentence By Using The "FIND" Method

Dec 14, 2008

giving me a macro to find a word in a sentence by using the "FIND" method.
For example I have a sentence say "I am happy" in which I have to search whether any of 2 words say "Happy" or "Sad" is there or not. If the sentence contains any of these words, then that row has to be highlighted.

View 9 Replies View Related

Delete Row Containing A Word

Sep 24, 2013

I have a Sheet1 and I need to delete the entire row(s) that contain the word "BUYER" located in column A using VBA.

View 5 Replies View Related

Word Art Will Not Delete

Jan 4, 2008

There is a word art pic in my excel file and i tried all options to get rid but could not do it.

View 9 Replies View Related

Find Word And Delete Row?

May 8, 2014

I am trying to find the word ''New'' and then delete row.Here is my current code below...

[Code]....

My code works fine upuntil Loopwhile.

The reason for this, on this particular occasion there is only one line containing 'new' so the code has nothing to loop....

So I need to re write

[Code] ....

In order to account for the possibility only one row ft's the word 'New'

Also might be worth mentioning the word New could ft in amongst other data in the particular cell.

View 3 Replies View Related

How To Delete A Word In Date

Jan 24, 2013

I have a file in which the data is written in cell.

1g Injection Total
10mg Tablets Total
1.5% w/w Gel Total

i want the to delete the word "Total" from each cell so that i can use the vlookup formula to get the desired result from another file.if there is any solution.looking forward for the an easy and understandable reply.

View 4 Replies View Related

Delete Everything In Cell Beyond First Word

May 5, 2009

I'm trying to figure out the best way to pull information from different worksheets. One field which I require has slight alterations between the sheets. I'd like to delete everything in the cell except for the very first word.

Here is a simple example (and I'd have this all through column A for instance)

Cell A1 = Multiple words here

Lets say I want to delete everything in the cell except the word "multiple"

View 6 Replies View Related

A Macro To Delete A Row That Does Not Contain A Given Word

Jun 9, 2009

I am trying to find a macro that deletes a row that does not contain a given word or string.

For example, if a row does not contain the string -> then delete it or even better select and move all such rows to another worksheet so that the main worksheet is left only with rows containing the string.

View 7 Replies View Related

Delete Row Based On Word Yes

Apr 24, 2012

Looking for a VBA code that deletes rows based on the word Yes. Column P to be precise

I have a Validation List in Column P and when the user will select "Yes" I need to have it delete the row that row. Any quick code?

View 2 Replies View Related

Delete All Columns Besides Two Selected

Aug 12, 2014

I'm prompting the user for what two ranges they want to keep in a excel sheet and then I want to delete the rest of the columns. There may be 5 total columns and there may be 30, it will vary. The reason I want to do this is because I will then save data to CSV file and it can only have two columns of data to be passed on for other data processing.

View 5 Replies View Related

Delete Selected Row, And All Rows Below **

Aug 21, 2007

I have the following code, to find the 1st cell in column CG that contains a value of more than -200. I wish to delete the entire row that this resides on, and all rows below.

Range("CG2").Select
Do While Not Selection.Value > -200
Selection.Offset(1, 0).Select
Loop

View 4 Replies View Related

Delete Selected Rows

Aug 20, 2008

I'm trying to write a macro that if a 1 appears in column N (1 may appear more than once & the sheet continues forever) then to hide that particular row.

I will also then have a seperate macro to delete the entire rows where 1 appears.

View 9 Replies View Related

Delete Selected Range

Mar 17, 2009

My data is in one column as follows:
ABC
(BLANK)DEF (BLANK)(BLANK)
What I want to do is to delete the blank cells and count how many not-empty cells.

The following sub works fine if I put the active cell manually in A1. However, the first range select always give me the "1004" error. Why? I don't have any clue.

Range("a1:a5").Select
Do Until ActiveCell.Value = "stop"
Do Until IsEmpty(ActiveCell)

Selection.Offset(1, 0).Select
Loop
ActiveCell.Delete
Loop

View 9 Replies View Related

How To Delete Specific Word From Every Line?

Sep 9, 2013

For example, on cell A1 I have 123456 Total, how do I delete the word "Total"? I have abut 2000 lines. What formula do I use?

View 5 Replies View Related

Delete Rows With Cells That Contain Some Word?

Mar 4, 2014

How can I delete all rows that have a cell that starts with the letters APP

View 3 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

Delete Entire Row If Specified Word Exist

Dec 12, 2009

In range A1:A300 I have a lotof words. What I want is to delete entire row if the cell value is Open date

View 3 Replies View Related

Delete Cell If Particular Word Found

Feb 14, 2012

I want to delete if my sheet have a value miles away

Sample
A1=0 miles away
a5=25 miles away
a30=50 miles away
how i delete these
a1=""
a5=""
a30=""
"' means null

View 2 Replies View Related







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