Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Writing a macro to bring back distinct value

I have a spreadsheet contains values in columns H, I and J.

I do not want the data in columns I and J so I want them
deleted, however, I do want some of the data in column H.
A number of the values appear more than once but all i
want is a list of distinct values from that row.

Any ideas as to how to go about this ?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Writing a macro to bring back distinct value

Hi
see:
http://www.cpearson.com/excel/duplic...tractingUnique
-----Original Message-----
I have a spreadsheet contains values in columns H, I and

J.

I do not want the data in columns I and J so I want them
deleted, however, I do want some of the data in column

H.
A number of the values appear more than once but all i
want is a list of distinct values from that row.

Any ideas as to how to go about this ?

Thanks
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Writing a macro to bring back distinct value

Turn on the macro recorder (Tools | Macro Record new macro...), do
the following, turn off the recorder, and switch to the VBE. XL will
give you the necessary code.

Select columns I and J and delete them.

Select any cell in column H that contains data and select Data | Filter
Advanced Filter...


In the dialog box, specify Unique records only and 'Copy to another
location.' Specify the other location as column I.

Once XL completes the filter, select column H and delete it.

Turn off the recorder.

If you would like help customizing or generalizing the code post it in
a follow up message and someone should be able to help you.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I have a spreadsheet contains values in columns H, I and J.

I do not want the data in columns I and J so I want them
deleted, however, I do want some of the data in column H.
A number of the values appear more than once but all i
want is a list of distinct values from that row.

Any ideas as to how to go about this ?

Thanks

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
Bring Back DBF! The GIS Industry uses it! Jobhater Excel Discussion (Misc queries) 6 June 9th 10 07:57 PM
Bring back .dbf in Excel Laura Excel Discussion (Misc queries) 11 July 13th 09 10:20 PM
how do i bring back excel sheet ? MoBi Excel Worksheet Functions 3 January 14th 08 01:52 PM
Bring Back Qualified Sum from another WB Excel Worksheet Functions 4 April 8th 05 01:01 AM
Bring back the old help format! John Przybylski Excel Worksheet Functions 2 April 5th 05 06:24 PM


All times are GMT +1. The time now is 03:45 AM.

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

About Us

"It's about Microsoft Excel"