Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Extract data in put in a new column

I have a problem is which I would like to extract the data in Column A
dependant on the value of column B.
Column A3:A22 contains unique names column B3:B22 contains the
numerical value. In this example I would extract the if the value of
column A if column B equals 6.
I would like to use formula approach.

Thanks
Michael
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Extract data in put in a new column

Hi Michael

Try
=INDEX(A3:A22,MATCH(6,B3:B22,0))

--
Regards

Roger Govier


"Michael" wrote in message
...
I have a problem is which I would like to extract the data in Column A
dependant on the value of column B.
Column A3:A22 contains unique names column B3:B22 contains the
numerical value. In this example I would extract the if the value of
column A if column B equals 6.
I would like to use formula approach.

Thanks
Michael



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Extract data in put in a new column

In C3:
=IF(ISERR(SMALL(IF($B$3:$B$22=6,ROW(INDIRECT("1:"& ROWS($B$3:$B$22)))),ROWS($1:1))),"",INDEX($A$3:$A$ 22,SMALL(IF($B$3:$B$22=6,ROW(INDIRECT("1:"&ROWS($B $3:$B$22)))),ROWS($1:1))))

ctrl+shift+enter, not just enter
Drag the Fill Handle to copy from C3 to C22


"Michael" wrote:

I have a problem is which I would like to extract the data in Column A
dependant on the value of column B.
Column A3:A22 contains unique names column B3:B22 contains the
numerical value. In this example I would extract the if the value of
column A if column B equals 6.
I would like to use formula approach.

Thanks
Michael

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Extract data in put in a new column

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(ROWS($1:1)<=COUNTIF(B$3:B$22,6),INDEX(A$3:A$22 ,SMALL(IF(B$3:B$22=6,ROW(A$3:A$22)-MIN(ROW(A$3:A$22))+1),ROWS($1:1))),"")

Copy down until you get blanks

Biff

"Michael" wrote in message
...
I have a problem is which I would like to extract the data in Column A
dependant on the value of column B.
Column A3:A22 contains unique names column B3:B22 contains the
numerical value. In this example I would extract the if the value of
column A if column B equals 6.
I would like to use formula approach.

Thanks
Michael



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Extract data in put in a new column

Since my array formula solution is practically the twin of Biff's, there's no
need to post it.

But.....I do have a NON-array version you might be interested in.

This formula builds the list beginning in cell
D3:
=IF(COUNTIF($B$3:$B$22,6)=ROWS($4:4),INDEX($A$3:$ A$22,INDEX(SMALL(($B$3:$B$22=6)*ROW($B$3:$B$22)+($ B$3:$B$22<6)*10^99,ROWS($4:4))-ROW($B$2),0)),"")

Copy down through D22

I hope that helps.
***********
Regards,
Ron

XL2002, WinXP


"Michael" wrote:

I have a problem is which I would like to extract the data in Column A
dependant on the value of column B.
Column A3:A22 contains unique names column B3:B22 contains the
numerical value. In this example I would extract the if the value of
column A if column B equals 6.
I would like to use formula approach.

Thanks
Michael



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Extract data in put in a new column

On Sat, 17 Feb 2007 13:25:38 -0800, Teethless mama
wrote:

=IF(ISERR(SMALL(IF($B$3:$B$22=6,ROW(INDIRECT("1:" &ROWS($B$3:$B$22)))),ROWS($1:1))),"",INDEX($A$3:$A $22,SMALL(IF($B$3:$B$22=6,ROW(INDIRECT("1:"&ROWS($ B$3:$B$22)))),ROWS($1:1))))

This worked.
Thanks to all who responded
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
Evaluate a column and extract last value Virg Excel Worksheet Functions 3 November 5th 06 09:03 PM
Can SUMPRODUCT be used to extract varying data in a column? Jakki Excel Worksheet Functions 8 August 25th 06 09:39 PM
Using a column of data from 1 worksheet to extract data from another worksheet [email protected] Excel Worksheet Functions 2 February 23rd 06 04:33 PM
extract data Column 1 starting with A1, A4, A7, A10, etc. Arlene Excel Worksheet Functions 1 September 13th 05 04:51 PM
extract column or row reference BRPtacek Excel Discussion (Misc queries) 3 August 23rd 05 11:29 PM


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