Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
a a is offline
external usenet poster
 
Posts: 3
Default how to use vlookup/find etc to extract rows

For a table like:

ATOM 11 C ASN 2 35.233 -19.675 10.91 1 21.57 1L25 247
ATOM 12 O ASN 2 36.364 -19.365 10.571 1 14.91 1L25 248
ATOM 13 CB ASN 2 34.556 -21.688 12.275 1 15.39 1L25 249
ATOM 14 CG ASN 2 35.728 -21.575 13.192 1 20.37 1L25 250
ATOM 15 OD1 ASN 2 36.27 -20.496 13.363 1 22.53 1L25 251
ATOM 16 ND2 ASN 2 36.076 -22.668 13.856 1 18.63 1L25 252
ATOM 17 N ILE 3 34.359 -18.814 11.359 1 19.04 1L25 253
ATOM 18 CA ILE 3 34.608 -17.394 11.367 1 16.26 1L25 254
ATOM 19 C ILE 3 35.827 -16.967 12.139 1 21.3 1L25 255
ATOM 20 O ILE 3 36.582 -16.036 11.741 1 17.38 1L25 256
ATOM 21 CB ILE 3 33.34 -16.614 11.714 1 15.86 1L25 257
ATOM 22 CG1 ILE 3 33.51 -15.116 11.408 1 13.4 1L25 258
ATOM 23 CG2 ILE 3 32.909 -16.932 13.181 1 11.39 1L25 259
ATOM 24 CD1 ILE 3 33.843 -14.688 9.937 1 8.45 1L25 260
ATOM 25 N PHE 4 36.028 -17.586 13.265 1 13.57 1L25 261
ATOM 26 CA PHE 4 37.184 -17.252 14.047 1 8.75 1L25 262


i would like to extract rows with the third column with specific string,
e.g. "CA"
I write something like =VLOOKUP("CA",$C$1:$C$1536,8, FALSE) and
=IF(FIND("CA",C237),J237,N237)

the latter one leaves me space which i don't prefer. Is there any way to
extract the rows and stack them one by one obeying their original order?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default how to use vlookup/find etc to extract rows

At P1 and P2 respectively:
=MATCH("CA",C:C,0)
=MATCH("CA",INDEX(C:C,P1+1):INDEX(C:C,1536),0)+P1
Copy down P2 until you get #N/A
Enter at Q1 and copy down:
=INDEX(J:J,P1)
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
search or find, and extract? SusanInTexas Excel Discussion (Misc queries) 1 August 24th 07 10:20 PM
find a name from a list then extract it JPreeshl Excel Discussion (Misc queries) 2 January 30th 07 06:26 PM
Find a worksheet and extract data Deborah Excel Worksheet Functions 1 January 10th 07 03:09 PM
VLookUp to extract data MD ENGINEER Excel Worksheet Functions 3 December 7th 06 06:36 PM
find a worksheet and extract data Deborah Excel Worksheet Functions 2 September 27th 06 03:39 PM


All times are GMT +1. The time now is 04:28 AM.

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"