Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Stumped: Find first match in list then reference dif cell in row..

Hey all -
Got a head-scratcher here. Hoping someone can help. Here's the scoop

I have a pile of data (6k+ rows). Amongst this data, there are two columns I
am working with:

COL A COL B
1234 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004
1345 1/22/2004
1344 2/14/2005

In a new COL C, I want to show the date from COL B that corresponds to the
first instance of each number string in COL A. For subsequent matches, I
want to show nothing (blank) or "N/A."

So using my example above, my completed sheet would look like this:

COL A COL B COL C
1234 1/1/2002 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004 1/22/2004
1345 1/22/2004
1344 2/14/2005 2/14/2005

Ideally this is all accomplished via function / formula in COL C (not macro
or UDF - though those are welcome as well). Any ideas?

Thanks in advance!
-meat
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Stumped: Find first match in list then reference dif cell in row..

meat,

In C2, use the formula

=IF(COUNTIF($A$2:A2,A2)=1,B2,"")

and copy down to match your list.

HTH,
Bernie
MS Excel MVP



"MeatLightning" wrote in message
...
Hey all -
Got a head-scratcher here. Hoping someone can help. Here's the scoop

I have a pile of data (6k+ rows). Amongst this data, there are two columns
I
am working with:

COL A COL B
1234 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004
1345 1/22/2004
1344 2/14/2005

In a new COL C, I want to show the date from COL B that corresponds to the
first instance of each number string in COL A. For subsequent matches, I
want to show nothing (blank) or "N/A."

So using my example above, my completed sheet would look like this:

COL A COL B COL C
1234 1/1/2002 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004 1/22/2004
1345 1/22/2004
1344 2/14/2005 2/14/2005

Ideally this is all accomplished via function / formula in COL C (not
macro
or UDF - though those are welcome as well). Any ideas?

Thanks in advance!
-meat



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Stumped: Find first match in list then reference dif cell inrow..

=if($A2<$A1,$B2,"") in C2, then Edit-Fill-Down
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Stumped: Find first match in list then reference dif cell in row..

One way
In C1: =IF(A1="","",IF(COUNTIF(A$1:A1,A1)1,"",B1))
Format C1 as date, copy down as far as required
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"MeatLightning" wrote:
Hey all -
Got a head-scratcher here. Hoping someone can help. Here's the scoop

I have a pile of data (6k+ rows). Amongst this data, there are two columns I
am working with:

COL A COL B
1234 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004
1345 1/22/2004
1344 2/14/2005

In a new COL C, I want to show the date from COL B that corresponds to the
first instance of each number string in COL A. For subsequent matches, I
want to show nothing (blank) or "N/A."

So using my example above, my completed sheet would look like this:

COL A COL B COL C
1234 1/1/2002 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004 1/22/2004
1345 1/22/2004
1344 2/14/2005 2/14/2005

Ideally this is all accomplished via function / formula in COL C (not macro
or UDF - though those are welcome as well). Any ideas?

Thanks in advance!
-meat

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Stumped: Find first match in list then reference dif cell in r

wow... thanks!! I was thinking this might be the route to go... but i didn't
think of locking the range (the "A$2" part - that keeps it from counting the
entire list) Nice! Very elegant.

thanks again!
-meat

"Bernie Deitrick" wrote:

meat,

In C2, use the formula

=IF(COUNTIF($A$2:A2,A2)=1,B2,"")

and copy down to match your list.

HTH,
Bernie
MS Excel MVP



"MeatLightning" wrote in message
...
Hey all -
Got a head-scratcher here. Hoping someone can help. Here's the scoop

I have a pile of data (6k+ rows). Amongst this data, there are two columns
I
am working with:

COL A COL B
1234 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004
1345 1/22/2004
1344 2/14/2005

In a new COL C, I want to show the date from COL B that corresponds to the
first instance of each number string in COL A. For subsequent matches, I
want to show nothing (blank) or "N/A."

So using my example above, my completed sheet would look like this:

COL A COL B COL C
1234 1/1/2002 1/1/2002
1234 1/1/2002
1234 1/1/2002
1345 1/22/2004 1/22/2004
1345 1/22/2004
1344 2/14/2005 2/14/2005

Ideally this is all accomplished via function / formula in COL C (not
macro
or UDF - though those are welcome as well). Any ideas?

Thanks in advance!
-meat




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 a match in a list jlclyde Excel Discussion (Misc queries) 1 February 28th 08 08:18 PM
Find closest text match for each unique entry in a list Nathan_Decker Excel Discussion (Misc queries) 2 September 23rd 07 01:36 AM
Find the closest match to a reference number in a row of unsorted Nick Krill Excel Worksheet Functions 3 January 1st 06 09:33 PM
find closest match to a reference number in a row of numbers Nick Krill Excel Discussion (Misc queries) 4 December 21st 05 12:59 PM
List box has me stumped. Eric Excel Discussion (Misc queries) 1 January 11th 05 12:29 AM


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