PDA

View Full Version : Need Macro to Copy and Ignore Duplicate



slapaks
04-10-2014, 12:48 AM
Sheet1




A
B
C


primary




primary




primary




secondary




secondary









Sheet2 (This is in different sheet )




A
B
C



Primary
Secondary



Hi everyone.

I need a macro that copy and ignore the duplicate of primary in sheet1 column A to another sheet (sheet2) column B. and also copy secondary (same ignore duplicate) in sheet1 column A to sheet2 column C.

GTO
04-10-2014, 01:52 AM
It appears that we are transposing unique values? Might you attach an example workbook with some sample data and what the results should be on Sheet2?

Mark

ashleyuk1984
04-10-2014, 02:03 AM
An idea to the solution is to do the following.

Copy the sheet
Remove duplicates
Copy data
Then use the Transpose paste option on sheet two.
Delete the sheet that you created at the beginning.

Now all you need is a optimized piece of code to do the above, or something else similar.

slapaks
04-10-2014, 06:19 PM
Hi,
I have attach a file showing with sheet1 as its masterlist. I already filtered the list ( color filled with blue 3 columns in sheet1). I want that if i filter columnJ(sheet1) by unchecking the blanks.It will show the labcode in column(F). I want to copy the labcode in column(F) to sheet2.( I already put some sample). Kindly check on it if you have time. Thanks


( the range filled with red color are next to be filtered unchecking the blanks again )