Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default help need on VBA code

Hi all,

I have the following data in columsn A and B. I would like to know how i can
about placing my curcer on column b and running code which will place first
number in column A against the name in B to achieve one number against each
unique name. Ive highlighted the desired results in column C so you can see
the pattern.

Your help is most appreciated.

a b c
Number name PrimaryNo
1 Black 1
2 Black 1
3 Black 1
4 Black 1
5 blue 5
6 red 6
7 yellow 7
8 Pink 8
9 Pink 8
10 Pink 8
11 Pink 8


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default help need on VBA code

Shane,

You don't need VBA. Put this in B1 and copy down

=MATCH(A1,$A$1:$A$100,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Shane" wrote in message
...
Hi all,

I have the following data in columsn A and B. I would like to know how i

can
about placing my curcer on column b and running code which will place

first
number in column A against the name in B to achieve one number against

each
unique name. Ive highlighted the desired results in column C so you can

see
the pattern.

Your help is most appreciated.

a b c
Number name PrimaryNo
1 Black 1
2 Black 1
3 Black 1
4 Black 1
5 blue 5
6 red 6
7 yellow 7
8 Pink 8
9 Pink 8
10 Pink 8
11 Pink 8




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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
option buttons run Click code when value is changed via VBA code neonangel Excel Programming 5 July 27th 04 08:32 AM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM


All times are GMT +1. The time now is 06:40 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"