Macro for deleting the specific value cell row

May 21, 2014 at 05:23:24
Specs: Windows 7
Can any friend help me with a macro which can delete the complete row with condition of a specific value?

Example:-
a Anita - 1
b Mita - 2
c Sita - 0
d Hita - 4

The macro can delete the row c. Please help


See More: Macro for deleting the specific value cell row

Report •

#1
May 21, 2014 at 05:59:04
You will need to modify your question before we can help you. It is not clear what you are trying to do.

There are 3 issues with the information you have provided:

1 - "c" is not a row. "C" is a column.

2 - It is not clear which "specific value" is being checked "Sita" or "0"

3 - It is not clear where the "specific value" will be found, i.e. in a cell by itself or in a cell with other data.

Please click on the blue line at the end of this post and read the instructions on how to post example data in this forum. Then please repost your example data using Column letters and Row numbers so that we can better understand the layout of your spreadsheet.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
May 21, 2014 at 06:31:29
Hi,

Thanks for your reply. Details are as follows:

MS Word Table

Name Amount 1 Amount 2
Row 1 A 1 2
Row 2 B 1 -
Row 3 C 1 2
Row 4 D - -
Row 5 E 1 2

1. I want to find text "-" in defined column Amount 1 and the same in Amount 2, if in both the defined column it is "-" then delete the row from the word table.
2. If there is some value in Amount 1 and Amount 2 is "-" then don't delete and same is applicable vice-versa.

Thanks in advance. God bless.


Report •

#3
May 21, 2014 at 06:36:59
RowNo. Name Amount 1 Amount 2
Row 1 A 1 2
Row 2 B 1 -
Row 3 C 1 2
Row 4 D - -
Row 5 E 1 2

Report •

Related Solutions

#4
May 21, 2014 at 10:16:55
It was not clear from your original post that this macro is to be used in a Word document. Most of the members of this forum are more familiar with Excel macros, so I'm not sure that you will find a solution here.

I would like to suggest that you post your question in this forum:

https://groups.google.com/forum/?hl...

Good luck!

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Ask Question