Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default extract of data with 3 different conditions?

I have data:
Worksheet 1
Name dept group host
A 1 A K
A 1 B F
A 2 A G
C 1 B D
D 2 C F

Worksheet 2
Name dept group host
A 1 A


Is there a auto lookup formula where I can pull data from worksheet 1 column
"host" to another worksheet with the Name, dept, group conditions met.
Eg Name =A, dept=1, and group=A. It will lookup from the table and return
host k.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default extract of data with 3 different conditions?

One way
In Sheet2,
In D2, normal ENTER to confirm:
=INDEX(Sheet1!D$2:D$6,MATCH(1,INDEX((Sheet1!A$2:A$ 6=A2)*(Sheet1!B$2:B$6=B2)*(Sheet1!C$2:C$6=C2),),0) )
Copy down. Adjust the ranges to suit the actual extents of your source data.
Modify easily to either remove or to add-on criteria bits as needed.
Success? Hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"P2000" wrote:
I have data:
Worksheet 1
Name dept group host
A 1 A K
A 1 B F
A 2 A G
C 1 B D
D 2 C F

Worksheet 2
Name dept group host
A 1 A


Is there a auto lookup formula where I can pull data from worksheet 1 column
"host" to another worksheet with the Name, dept, group conditions met.
Eg Name =A, dept=1, and group=A. It will lookup from the table and return
host k.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default extract of data with 3 different conditions?

Thanks it work perfectly, but can we return a "Nil" message in the host
column if the index is unable to satisify any one of the name, dept, group.
Currently I got the error #N/A if any of the group is not met.

"Max" wrote:

One way
In Sheet2,
In D2, normal ENTER to confirm:
=INDEX(Sheet1!D$2:D$6,MATCH(1,INDEX((Sheet1!A$2:A$ 6=A2)*(Sheet1!B$2:B$6=B2)*(Sheet1!C$2:C$6=C2),),0) )
Copy down. Adjust the ranges to suit the actual extents of your source data.
Modify easily to either remove or to add-on criteria bits as needed.
Success? Hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"P2000" wrote:
I have data:
Worksheet 1
Name dept group host
A 1 A K
A 1 B F
A 2 A G
C 1 B D
D 2 C F

Worksheet 2
Name dept group host
A 1 A


Is there a auto lookup formula where I can pull data from worksheet 1 column
"host" to another worksheet with the Name, dept, group conditions met.
Eg Name =A, dept=1, and group=A. It will lookup from the table and return
host k.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default extract of data with 3 different conditions?

Indicatively, use an IF(ISNA error trap on the MATCH bit, viz.:
=IF(ISNA(MATCH(..)),"Nil",INDEX(..))

In D2, copied down:
=IF(ISNA(MATCH(1,INDEX((Sheet1!A$2:A$6=A2)*(Sheet1 !B$2:B$6=B2)*(Sheet1!C$2:C$6=C2),),0)),"Nil",INDEX (Sheet1!D$2:D$6,MATCH(1,INDEX((Sheet1!A$2:A$6=A2)* (Sheet1!B$2:B$6=B2)*(Sheet1!C$2:C$6=C2),),0)))
voila? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"P2000" wrote:
Thanks it work perfectly, but can we return a "Nil" message in the host
column if the index is unable to satisify any one of the name, dept, group.
Currently I got the error #N/A if any of the group is not met.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default extract of data with 3 different conditions?

Got it! Thank you.

"Max" wrote:

Indicatively, use an IF(ISNA error trap on the MATCH bit, viz.:
=IF(ISNA(MATCH(..)),"Nil",INDEX(..))

In D2, copied down:
=IF(ISNA(MATCH(1,INDEX((Sheet1!A$2:A$6=A2)*(Sheet1 !B$2:B$6=B2)*(Sheet1!C$2:C$6=C2),),0)),"Nil",INDEX (Sheet1!D$2:D$6,MATCH(1,INDEX((Sheet1!A$2:A$6=A2)* (Sheet1!B$2:B$6=B2)*(Sheet1!C$2:C$6=C2),),0)))
voila? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"P2000" wrote:
Thanks it work perfectly, but can we return a "Nil" message in the host
column if the index is unable to satisify any one of the name, dept, group.
Currently I got the error #N/A if any of the group is not met.




  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default extract of data with 3 different conditions?

Welcome, good to hear
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"P2000" wrote in message
...
Got it! Thank you.



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
extract names based on conditions Bobak Excel Discussion (Misc queries) 2 September 3rd 08 08:16 PM
Tying to extract all data from a pivot pulling from external data Ted Urban Excel Discussion (Misc queries) 3 September 14th 07 10:50 AM
Formula to Extract value on 3 column based on two conditions wayliff Excel Discussion (Misc queries) 0 January 12th 06 08:20 PM
How to extract the data Shiva Excel Worksheet Functions 2 November 1st 05 04:41 AM


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