Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Macro to find duplicates

Hi, I have a worksheet that has the following structure

A B
1 2 345
2 1 345
3 1 512

In column B there are values, and in column A there is a number that
indicates if the value in column B is repeated. In case it is repeated, I
want a macro that display in column C the result of multiplying that value
*2. Following the example I just wrote, I would need the value 690 displayed
in column C.

Hope it is clear enough

Thanks in advance

Regards,
Emece.-
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Macro to find duplicates

If you want to multiply only those values which are duplicate (a 2 in Col A)
then use this in C1 and copy down
=IF(A1=2,B1*A1,"")

If you want to multiple all values then simply use
=B1*A1

If you want to multiply all values greater than 1 then use
=IF(A11,B1*A1,"")

What is your ultimate purpose in doing this?

"Emece" wrote:

Hi, I have a worksheet that has the following structure

A B
1 2 345
2 1 345
3 1 512

In column B there are values, and in column A there is a number that
indicates if the value in column B is repeated. In case it is repeated, I
want a macro that display in column C the result of multiplying that value
*2. Following the example I just wrote, I would need the value 690 displayed
in column C.

Hope it is clear enough

Thanks in advance

Regards,
Emece.-

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Macro to find duplicates

On Feb 3, 9:39*am, Emece wrote:
Hi, I have a worksheet that has the following structure

* * *A * * B * * *
1 * 2 * *345 * *
2 * 1 * *345
3 * 1 * *512

In column B there are values, and in column A there is a number that
indicates if the value in column B is repeated. In case it is repeated, I
want a macro that display in column C the result of multiplying that value
*2. Following the example I just wrote, I would need the value 690 displayed
in column C.

Hope it is clear enough

Thanks in advance

Regards,
Emece.-


Why use a macro?
You could just as easily use an If .

in C1 =IF(B1=B2,B1*2,"") This will multiply each duplicate by 2.
Just drag down to other cells.

Jay
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Macro to find duplicates

Perhaps I didn't express myself correctly. I have several values in column B,
and values that are duplicated not necessarily are in adjacent rows. So, I
need to check the entire column and find duplicated values. Also, if the
value is duplicated, after doing 345+345, I need to delete one of both value.
Hope now it is clear enough.

Thanks again

"Sheeloo" wrote:

If you want to multiply only those values which are duplicate (a 2 in Col A)
then use this in C1 and copy down
=IF(A1=2,B1*A1,"")

If you want to multiple all values then simply use
=B1*A1

If you want to multiply all values greater than 1 then use
=IF(A11,B1*A1,"")

What is your ultimate purpose in doing this?

"Emece" wrote:

Hi, I have a worksheet that has the following structure

A B
1 2 345
2 1 345
3 1 512

In column B there are values, and in column A there is a number that
indicates if the value in column B is repeated. In case it is repeated, I
want a macro that display in column C the result of multiplying that value
*2. Following the example I just wrote, I would need the value 690 displayed
in column C.

Hope it is clear enough

Thanks in advance

Regards,
Emece.-

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Macro to find duplicates



"jlclyde" wrote:

On Feb 3, 9:39 am, Emece wrote:
Hi, I have a worksheet that has the following structure

A B
1 2 345
2 1 345
3 1 512

In column B there are values, and in column A there is a number that
indicates if the value in column B is repeated. In case it is repeated, I
want a macro that display in column C the result of multiplying that value
*2. Following the example I just wrote, I would need the value 690 displayed
in column C.

Hope it is clear enough

Thanks in advance

Regards,
Emece.-


Why use a macro?
You could just as easily use an If .

in C1 =IF(B1=B2,B1*2,"") This will multiply each duplicate by 2.
Just drag down to other cells.

Jay


Perhaps I didn't express myself correctly. I have several values in column B,
and values that are duplicated not necessarily are in adjacent rows. So, I
need to check the entire column and find duplicated values. Also, if the
value is duplicated, after doing 345+345, I need to delete one of both value.
Hope now it is clear enough.

Thanks again


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
find duplicates Dylan @ UAFC[_2_] Excel Worksheet Functions 5 December 14th 08 03:00 PM
Find duplicates Daniel - Sydney Excel Discussion (Misc queries) 4 September 27th 07 10:03 PM
Please help with a "find duplicates" macro - 4/10/07 41db14 Excel Worksheet Functions 13 April 13th 07 05:42 PM
Find Duplicates Shirley Munro Excel Discussion (Misc queries) 1 February 16th 06 11:56 AM
Find duplicates R. Choate Excel Discussion (Misc queries) 5 November 28th 04 10:14 PM


All times are GMT +1. The time now is 12:29 PM.

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"