Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default compareing 2 columns

Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.

Is there a way to do it with a macro?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default compareing 2 columns

You could enter a formula like this in C1:

=IF(A1=B1,"ok","delete")

and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.

Hope this helps.

Pete

On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.

Is there a way to do it with a macro?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default compareing 2 columns

I does not work properly. In column B I have the +1 values such as

1406 14061
1407 14071

but sometimes wrong things like

1408 1408
1408 .C

You could enter a formula like this in C1:

=IF(A1=B1,"ok","delete")

and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.

Hope this helps.

Pete

On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.

Is there a way to do it with a macro?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default compareing 2 columns

Well, please explain again what you are trying to do.

Pete

On Oct 10, 5:33 pm, "tomi12619" <tomi12619@laptop wrote:
I does not work properly. In column B I have the +1 values such as

1406 14061
1407 14071

but sometimes wrong things like

1408 1408
1408 .C



You could enter a formula like this in C1:


=IF(A1=B1,"ok","delete")


and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.


Hope this helps.


Pete


On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.


Is there a way to do it with a macro?- Hide quoted text -


- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default compareing 2 columns

A B C
1406 14061 OK
1407 14071 OK
1407 587 Wrong!!
1426 . Wrong!!
1426 1426 Wrong!!


the first row 1406=1406+1 is correct logically. Other values, strings
are bad. I would like to delete the OK things.

Column C: well, I would like to do this...

On Oct 10, 11:44 pm, Pete_UK wrote:
Well, please explain again what you are trying to do.

Pete

On Oct 10, 5:33 pm, "tomi12619" <tomi12619@laptop wrote:



I does not work properly. In column B I have the +1 values such as


1406 14061
1407 14071


but sometimes wrong things like


1408 1408
1408 .C


You could enter a formula like this in C1:


=IF(A1=B1,"ok","delete")


and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.


Hope this helps.


Pete


On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.


Is there a way to do it with a macro?- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default compareing 2 columns

You could try something like this in C1:

=IF(A1&"1"=B1,"OK","Wrong!!")

then copy down and apply the filter to choose OK, then Edit | Delete
Row.

Hope this helps.

Pete

On Oct 11, 7:35 am, Tamas Konczer wrote:
A B C
1406 14061 OK
1407 14071 OK
1407 587 Wrong!!
1426 . Wrong!!
1426 1426 Wrong!!

the first row 1406=1406+1 is correct logically. Other values, strings
are bad. I would like to delete the OK things.

Column C: well, I would like to do this...

On Oct 10, 11:44 pm, Pete_UK wrote:



Well, please explain again what you are trying to do.


Pete


On Oct 10, 5:33 pm, "tomi12619" <tomi12619@laptop wrote:


I does not work properly. In column B I have the +1 values such as


1406 14061
1407 14071


but sometimes wrong things like


1408 1408
1408 .C


You could enter a formula like this in C1:


=IF(A1=B1,"ok","delete")


and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.


Hope this helps.


Pete


On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.


Is there a way to do it with a macro?- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default compareing 2 columns

Thank you Pete.
Well, it is still not works but maybe somehow I gonna try it in this way.

You could try something like this in C1:

=IF(A1&"1"=B1,"OK","Wrong!!")

then copy down and apply the filter to choose OK, then Edit | Delete
Row.

Hope this helps.

Pete

On Oct 11, 7:35 am, Tamas Konczer wrote:
A B C
1406 14061 OK
1407 14071 OK
1407 587 Wrong!!
1426 . Wrong!!
1426 1426 Wrong!!

the first row 1406=1406+1 is correct logically. Other values, strings
are bad. I would like to delete the OK things.

Column C: well, I would like to do this...

On Oct 10, 11:44 pm, Pete_UK wrote:



Well, please explain again what you are trying to do.


Pete


On Oct 10, 5:33 pm, "tomi12619" <tomi12619@laptop wrote:


I does not work properly. In column B I have the +1 values such as


1406 14061
1407 14071


but sometimes wrong things like


1408 1408
1408 .C


You could enter a formula like this in C1:


=IF(A1=B1,"ok","delete")


and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.


Hope this helps.


Pete


On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.


Is there a way to do it with a macro?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default compareing 2 columns

Ah well, maybe you have spaces at the end of 1406 or 14061 - if so use
TRIM to get rid of them.

Pete

On Oct 12, 6:01 pm, "tomi12619" <tomi12619@laptop wrote:
Thank you Pete.
Well, it is still not works but maybe somehow I gonna try it in this way.



You could try something like this in C1:


=IF(A1&"1"=B1,"OK","Wrong!!")


then copy down and apply the filter to choose OK, then Edit | Delete
Row.


Hope this helps.


Pete


On Oct 11, 7:35 am, Tamas Konczer wrote:
A B C
1406 14061 OK
1407 14071 OK
1407 587 Wrong!!
1426 . Wrong!!
1426 1426 Wrong!!


the first row 1406=1406+1 is correct logically. Other values, strings
are bad. I would like to delete the OK things.


Column C: well, I would like to do this...


On Oct 10, 11:44 pm, Pete_UK wrote:


Well, please explain again what you are trying to do.


Pete


On Oct 10, 5:33 pm, "tomi12619" <tomi12619@laptop wrote:


I does not work properly. In column B I have the +1 values such as


1406 14061
1407 14071


but sometimes wrong things like


1408 1408
1408 .C


You could enter a formula like this in C1:


=IF(A1=B1,"ok","delete")


and then copy down for as many values as you have. Then use Data |
Filter | Autofilter, and on the drop-down in column C select "delete".
Highlight all the visible rows and click on Edit | Delete Row. Remove
the filters and delete column C.


Hope this helps.


Pete


On Oct 9, 10:40 pm, "tomi12619" <tomi12619@laptop wrote:
Hi
I would like to compare 2 columns values. the "+1" is still value. For example there are 1406 in column A and 14061 in column B in this case the whole row should be deleted from the workbook.


Is there a way to do it with a macro?- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arrange data spanning 8 columns and 3 rows to 24 columns and 1 row pfdino Excel Discussion (Misc queries) 2 March 19th 07 09:03 PM
to convert columns to rows having mulit independent group columns Quacy Excel Worksheet Functions 1 August 22nd 06 11:20 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Pivot Table Creating New Columns that Subtract Two Existing Columns den4673 Excel Discussion (Misc queries) 3 December 17th 04 01:31 PM


All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"