PC Review


Reply
Thread Tools Rate Thread

Complicated Lookup

 
 
Trefor
Guest
Posts: n/a
 
      7th Jul 2008
There is to be a lot of discussion on multiple column lookups but they are
exact matches and I just can't wrap my head around this one.

I have 2 text values in C3 and C4.

C3 needs to exactly match a value from column D, E, F or G. (column headings
at row 10, so data from 11 down).

C4 must be found within a list of CSV’s in each cell in column H. (column
headings at row 10, so data from 11 down).

I then need the value under the heading in Column C that matches the same row.

--
Trefor
 
Reply With Quote
 
 
 
 
Trefor
Guest
Posts: n/a
 
      7th Jul 2008
Sorry I meant to add that I only need to get the C4 match if there is more
than one match for C3. So if the C3 match is unique that is good enough.

Any help at all would really be appreciated.

--
Trefor


"Trefor" wrote:

> There is to be a lot of discussion on multiple column lookups but they are
> exact matches and I just can't wrap my head around this one.
>
> I have 2 text values in C3 and C4.
>
> C3 needs to exactly match a value from column D, E, F or G. (column headings
> at row 10, so data from 11 down).
>
> C4 must be found within a list of CSV’s in each cell in column H. (column
> headings at row 10, so data from 11 down).
>
> I then need the value under the heading in Column C that matches the same row.
>
> --
> Trefor

 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      7th Jul 2008
You can use COUNTIF to see if there is more than one match between C3
and the data in columns D E F or G, so you could try something like
this:

=IF(COUNTIF(D11:G100,C3)=0,"Not
present",IF(COUNTIF(D11:G100,C3)>1,INDEX(C11:C100,MATCH(C4,H11:H100,0)),INDEX(C11:C100,IF(ISNA(MATCH(C3,D11100,0)),IF(ISNA(MATCH(C3,E11:E100,0)),IF(ISNA(MATCH(C3,F11:F100,0)),MATCH(C3,G11:G100,0),MATCH(C3,F11:F100,0)),MATCH(C3,E11:E100,0)),MATCH(C3,D11100,0)))))

All one formula - be wary of spurious line breaks in the newsgroups.

Hope this helps.

Pete

On Jul 7, 11:16*am, Trefor <Tre...@home.com> wrote:
> Sorry I meant to add that I only need to get the C4 match if there is more
> than one match for C3. So if the C3 match is unique that is good enough.
>
> Any help at all would really be appreciated.
>
> --
> Trefor
>
>
>
> "Trefor" wrote:
> > There is to be a lot of discussion on multiple column lookups but they are
> > exact matches and I just can't wrap my head around this one.

>
> > I have 2 text values in C3 and C4.

>
> > C3 needs to exactly match a value from column D, E, F or G. (column headings
> > at row 10, so data from 11 down).

>
> > C4 must be found within a list of CSV’s in each cell in column H. (column
> > headings at row 10, so data from 11 down).

>
> > I then need the value under the heading in Column C that matches the same row.

>
> > --
> > Trefor- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      7th Jul 2008
I forgot to say that I've assumed that you have data to row 100 -
change all instances of 100 if you have more rows.

Hope this helps.

Pete

On Jul 7, 12:04*pm, Pete_UK <pashu...@auditel.net> wrote:
> You can use COUNTIF to see if there is more than one match between C3
> and the data in columns D E F or G, so you could try something like
> this:
>
> =IF(COUNTIF(D11:G100,C3)=0,"Not
> present",IF(COUNTIF(D11:G100,C3)>1,INDEX(C11:C100,MATCH(C4,H11:H100,0)),IND*EX(C11:C100,IF(ISNA(MATCH(C3,D11100,0)),IF(ISNA(MATCH(C3,E11:E100,0)),IF(*ISNA(MATCH(C3,F11:F100,0)),MATCH(C3,G11:G100,0),MATCH(C3,F11:F100,0)),MATCH*(C3,E11:E100,0)),MATCH(C3,D11100,0)))))
>
> All one formula - be wary of spurious line breaks in the newsgroups.
>
> Hope this helps.
>
> Pete
>
> On Jul 7, 11:16*am, Trefor <Tre...@home.com> wrote:
>
>
>
> > Sorry I meant to add that I only need to get the C4 match if there is more
> > than one match for C3. So if the C3 match is unique that is good enough..

>
> > Any help at all would really be appreciated.

>
> > --
> > Trefor

>
> > "Trefor" wrote:
> > > There is to be a lot of discussion on multiple column lookups but they are
> > > exact matches and I just can't wrap my head around this one.

>
> > > I have 2 text values in C3 and C4.

>
> > > C3 needs to exactly match a value from column D, E, F or G. (column headings
> > > at row 10, so data from 11 down).

>
> > > C4 must be found within a list of CSV’s in each cell in column H. (column
> > > headings at row 10, so data from 11 down).

>
> > > I then need the value under the heading in Column C that matches the same row.

>
> > > --
> > > Trefor- Hide quoted text -

>
> > - Show quoted text -- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
Bernard Liengme
Guest
Posts: n/a
 
      7th Jul 2008
In C10:G10 I have the letters a,b,c,.....
In H11,H20 I have aa,bb,cc,dd,ee,ff,....
In C3 I have: b
In C4 I have: dd
In D3 I use =MATCH(C3,C10:G10,0) this returns 2 since "b" is the second
entry in C10:G10
In D4 I use =MATCH(C4,H11:H20,0) this returns 4 since "dd" is the fourth
entry in H11:H20
In D5 I used =INDEX(C11:G20,D4,D3) to locate the item in row 4, column 2

I could combine this to one formula
=INDEX(C11:G20,MATCH(C4,H11:H100,0),MATCH(C3,C10:G10,0))

Not so complicated after all <grin>
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Trefor" <(E-Mail Removed)> wrote in message
news:F0F9590E-9FD9-4D0D-B6DC-(E-Mail Removed)...
> There is to be a lot of discussion on multiple column lookups but they are
> exact matches and I just can't wrap my head around this one.
>
> I have 2 text values in C3 and C4.
>
> C3 needs to exactly match a value from column D, E, F or G. (column
> headings
> at row 10, so data from 11 down).
>
> C4 must be found within a list of CSV's in each cell in column H. (column
> headings at row 10, so data from 11 down).
>
> I then need the value under the heading in Column C that matches the same
> row.
>
> --
> Trefor



 
Reply With Quote
 
Trefor
Guest
Posts: n/a
 
      7th Jul 2008
Pete,

Many thanks for the reply, this is very close, but something is broken.

C3 = "FUJITSU AUSTRALIA LTD"
C4 = "NSW"
Your formula is in D4 and = "Di Data - NSW" - Which is wrong! But every
other possible configuration for C3 works perfectly, it does not make any
sense, but then I am still trying to get to grips with you formula.

C11 - C14
Di Data - NSW
Di Data - VIC, SA, WA
Fujitsu Aust (North)
Fujitsu Aust (South)

D11 - D14
DIMENSION DATA AUSTRALIA PTY LTD
DIMENSION DATA AUSTRALIA PTY LTD
FUJITSU AUSTRALIA
FUJITSU AUSTRALIA

E11 - E14
DIMENSION DATA
DIMENSION DATA
FUJITSU AUSTRALIA LIMITED
FUJITSU AUSTRALIA LIMITED

F13 - F14
FUJITSU AUSTRALIA LTD
FUJITSU AUSTRALIA LTD

G11 - G14 - blank

H11 - H14
NSW
VIC, SA, WA
QLD, NSW, NT, ACT
VIC, WA, SA, TAS



--
Trefor


"Pete_UK" wrote:

> I forgot to say that I've assumed that you have data to row 100 -
> change all instances of 100 if you have more rows.
>
> Hope this helps.
>
> Pete
>
> On Jul 7, 12:04 pm, Pete_UK <pashu...@auditel.net> wrote:
> > You can use COUNTIF to see if there is more than one match between C3
> > and the data in columns D E F or G, so you could try something like
> > this:
> >
> > =IF(COUNTIF(D11:G100,C3)=0,"Not
> > present",IF(COUNTIF(D11:G100,C3)>1,INDEX(C11:C100,MATCH(C4,H11:H100,0)),INDÂ*EX(C11:C100,IF(ISNA(MATCH(C3,D11100,0)),IF(ISNA(MATCH(C3,E11:E100,0)),IF(Â*ISNA(MATCH(C3,F11:F100,0)),MATCH(C3,G11:G100,0),MATCH(C3,F11:F100,0)),MATCHÂ*(C3,E11:E100,0)),MATCH(C3,D11100,0)))))
> >
> > All one formula - be wary of spurious line breaks in the newsgroups.
> >
> > Hope this helps.
> >
> > Pete
> >
> > On Jul 7, 11:16 am, Trefor <Tre...@home.com> wrote:
> >
> >
> >
> > > Sorry I meant to add that I only need to get the C4 match if there is more
> > > than one match for C3. So if the C3 match is unique that is good enough..

> >
> > > Any help at all would really be appreciated.

> >
> > > --
> > > Trefor

> >
> > > "Trefor" wrote:
> > > > There is to be a lot of discussion on multiple column lookups but they are
> > > > exact matches and I just can't wrap my head around this one.

> >
> > > > I have 2 text values in C3 and C4.

> >
> > > > C3 needs to exactly match a value from column D, E, F or G. (column headings
> > > > at row 10, so data from 11 down).

> >
> > > > C4 must be found within a list of CSV’s in each cell in column H. (column
> > > > headings at row 10, so data from 11 down).

> >
> > > > I then need the value under the heading in Column C that matches the same row.

> >
> > > > --
> > > > Trefor- Hide quoted text -

> >
> > > - Show quoted text -- Hide quoted text -

> >
> > - Show quoted text -

>
>

 
Reply With Quote
 
Trefor
Guest
Posts: n/a
 
      7th Jul 2008
Bernard,

I just sent an update to Pete with all the data. If I simply replace Pete's
formula with your formula I get #N/A.

C10:G10 in my sheet are column headers, not data. Sorry I am missing
something here.

--
Trefor


"Bernard Liengme" wrote:

> In C10:G10 I have the letters a,b,c,.....
> In H11,H20 I have aa,bb,cc,dd,ee,ff,....
> In C3 I have: b
> In C4 I have: dd
> In D3 I use =MATCH(C3,C10:G10,0) this returns 2 since "b" is the second
> entry in C10:G10
> In D4 I use =MATCH(C4,H11:H20,0) this returns 4 since "dd" is the fourth
> entry in H11:H20
> In D5 I used =INDEX(C11:G20,D4,D3) to locate the item in row 4, column 2
>
> I could combine this to one formula
> =INDEX(C11:G20,MATCH(C4,H11:H100,0),MATCH(C3,C10:G10,0))
>
> Not so complicated after all <grin>
> best wishes
> --
> Bernard V Liengme
> Microsoft Excel MVP
> http://people.stfx.ca/bliengme
> remove caps from email
>
> "Trefor" <(E-Mail Removed)> wrote in message
> news:F0F9590E-9FD9-4D0D-B6DC-(E-Mail Removed)...
> > There is to be a lot of discussion on multiple column lookups but they are
> > exact matches and I just can't wrap my head around this one.
> >
> > I have 2 text values in C3 and C4.
> >
> > C3 needs to exactly match a value from column D, E, F or G. (column
> > headings
> > at row 10, so data from 11 down).
> >
> > C4 must be found within a list of CSV's in each cell in column H. (column
> > headings at row 10, so data from 11 down).
> >
> > I then need the value under the heading in Column C that matches the same
> > row.
> >
> > --
> > Trefor

>
>
>

 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      7th Jul 2008
Well, as I understand your problem, you have "Fujitsu Australia Ltd"
appearing more than once in columns D to G, so in this instance you
want to match what is in C4 with column H. "NSW" is in the first row
of column H (below your headings), so it matches with C11 - "Di Data -
NSW".

What would you expect it to show?

Pete

On Jul 7, 2:45*pm, Trefor <Tre...@home.com> wrote:
> Pete,
>
> Many thanks for the reply, this is very close, but something is broken.
>
> C3 = "FUJITSU AUSTRALIA LTD"
> C4 = "NSW"
> Your formula is in D4 and = "Di Data - NSW" - Which is wrong! But every
> other possible configuration for C3 works perfectly, it does not make any
> sense, but then I am still trying to get to grips with you formula.
>
> C11 - C14
> Di Data - NSW
> Di Data - VIC, SA, WA
> Fujitsu Aust (North)
> Fujitsu Aust (South)
>
> D11 - D14
> DIMENSION DATA AUSTRALIA PTY LTD
> DIMENSION DATA AUSTRALIA PTY LTD
> FUJITSU AUSTRALIA
> FUJITSU AUSTRALIA
>
> E11 - E14
> DIMENSION DATA
> DIMENSION DATA
> FUJITSU AUSTRALIA LIMITED
> FUJITSU AUSTRALIA LIMITED
>
> F13 - F14
> FUJITSU AUSTRALIA LTD
> FUJITSU AUSTRALIA LTD
>
> G11 - G14 - blank
>
> H11 - H14
> NSW
> VIC, SA, WA
> QLD, NSW, NT, ACT
> VIC, WA, SA, TAS
>
> --
> Trefor
>

 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      7th Jul 2008
Try this in say C5, array-entered*:
=IF(ISNA(MATCH(1,(ISNUMBER(SEARCH(C3,D1114)))*(ISNUMBER(SEARCH(C4,H11:H14))),0)),IF(ISNA(MATCH(1,(ISNUMBER(SEARCH(C3,E11:E14)))*(ISNUMBER(SEARCH(C4,H11:H14))),0)),IF(ISNA(MATCH(1,(ISNUMBER(SEARCH(C3,F11:F14)))*(ISNUMBER(SEARCH(C4,H11:H14))),0)),"",INDEX(C11:C14,MATCH(1,(ISNUMBER(SEARCH(C3,F11:F14)))*(ISNUMBER(SEARCH(C4,H11:H14))),0))),INDEX(C11:C14,MATCH(1,(ISNUMBER(SEARCH(C3,E11:E14)))*(ISNUMBER(SEARCH(C4,H11:H14))),0))),INDEX(C11:C14,MATCH(1,(ISNUMBER(SEARCH(C3,D1114)))*(ISNUMBER(SEARCH(C4,H11:H14))),0)))

*Array-enter = Press CTRL+SHIFT+ENTER to confirm the formula
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"Trefor" wrote:
> C3 = "FUJITSU AUSTRALIA LTD"
> C4 = "NSW"
>
> C11 - C14
> Di Data - NSW
> Di Data - VIC, SA, WA
> Fujitsu Aust (North)
> Fujitsu Aust (South)
>
> D11 - D14
> DIMENSION DATA AUSTRALIA PTY LTD
> DIMENSION DATA AUSTRALIA PTY LTD
> FUJITSU AUSTRALIA
> FUJITSU AUSTRALIA
>
> E11 - E14
> DIMENSION DATA
> DIMENSION DATA
> FUJITSU AUSTRALIA LIMITED
> FUJITSU AUSTRALIA LIMITED
>
> F13 - F14
> FUJITSU AUSTRALIA LTD
> FUJITSU AUSTRALIA LTD
>
> G11 - G14 - blank
>
> H11 - H14
> NSW
> VIC, SA, WA
> QLD, NSW, NT, ACT
> VIC, WA, SA, TAS

 
Reply With Quote
 
Trefor
Guest
Posts: n/a
 
      8th Jul 2008
Pete,

I am expecting it to give me what is in C13.

So if C3 = something in (D or E or F or G) AND H then result = C of the same
row.

I think Max may have cracked what I need, so many thanks for your help.

--
Trefor


"Pete_UK" wrote:

> Well, as I understand your problem, you have "Fujitsu Australia Ltd"
> appearing more than once in columns D to G, so in this instance you
> want to match what is in C4 with column H. "NSW" is in the first row
> of column H (below your headings), so it matches with C11 - "Di Data -
> NSW".
>
> What would you expect it to show?
>
> Pete
>
> On Jul 7, 2:45 pm, Trefor <Tre...@home.com> wrote:
> > Pete,
> >
> > Many thanks for the reply, this is very close, but something is broken.
> >
> > C3 = "FUJITSU AUSTRALIA LTD"
> > C4 = "NSW"
> > Your formula is in D4 and = "Di Data - NSW" - Which is wrong! But every
> > other possible configuration for C3 works perfectly, it does not make any
> > sense, but then I am still trying to get to grips with you formula.
> >
> > C11 - C14
> > Di Data - NSW
> > Di Data - VIC, SA, WA
> > Fujitsu Aust (North)
> > Fujitsu Aust (South)
> >
> > D11 - D14
> > DIMENSION DATA AUSTRALIA PTY LTD
> > DIMENSION DATA AUSTRALIA PTY LTD
> > FUJITSU AUSTRALIA
> > FUJITSU AUSTRALIA
> >
> > E11 - E14
> > DIMENSION DATA
> > DIMENSION DATA
> > FUJITSU AUSTRALIA LIMITED
> > FUJITSU AUSTRALIA LIMITED
> >
> > F13 - F14
> > FUJITSU AUSTRALIA LTD
> > FUJITSU AUSTRALIA LTD
> >
> > G11 - G14 - blank
> >
> > H11 - H14
> > NSW
> > VIC, SA, WA
> > QLD, NSW, NT, ACT
> > VIC, WA, SA, TAS
> >
> > --
> > Trefor
> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup (more complicated) F Tahbaz Microsoft Excel Discussion 2 26th Aug 2010 02:40 AM
Lookup Help Complicated Gizmo Microsoft Excel Misc 1 19th Apr 2008 05:53 PM
Really Complicated Lookup =?Utf-8?B?SGVsaW9jcmFjeQ==?= Microsoft Excel Programming 6 12th Oct 2007 04:47 PM
COMPLICATED LOOKUP lehigh@nni.com Microsoft Excel Worksheet Functions 6 18th Oct 2003 09:31 AM
complicated lookup leo Microsoft Excel Worksheet Functions 0 27th Aug 2003 04:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:19 PM.