Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default vlookup or dget with multiple condition - help please

Hi
I have 2 sheets
sheet1 has july data and sheet2 has august data (7000 rows data)
each with 8 column data
8th column has the status value like good, spoiled, damaged, repaired.. so
on (8values)
the data in july & august are not in the regular row order.
So in the august sheet col A to F has to be searched with July A to F colum
and if everything matches i need value in July G column to be placed in Aug
G col.
i want the function to be placed in Aug sheet G colum. So that i can copy
the forumula down 7000 rows, if doesnt match then zero or error value need to
be displayed.
So far i tackle this issue like a3&b3&c3&d3&e3&f3 in column A (inserted
colum) in july and similarly in August sheet, then use vlookup()
Advance thanks for help.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default vlookup or dget with multiple condition - help please

Assume identically structured data in Sheets 1 and 2, cols A to F, data from
row3 down to row7000?

In Sheet2 (for August),

Put this in G3 and array-enter the formula by pressing CRL+SHIFT+ENTER:
=INDEX(Sheet1!G$3:G$7000,MATCH(1,(Sheet1!A$3:A$700 0=A3)*(Sheet1!B$3:B$7000=B3)*(Sheet1!C$3:C$7000=C3 )*(Sheet1!D$3:D$7000=D3)*(Sheet1!D$3:D$7000=D3)*(S heet1!F$3:F$7000=F3),0))
Copy G3 down as far as required.

And if you want an error trap to return zeros for any non-matches found, put
this instead in G3, array-enter, copy down:
=IF(ISNA(MATCH(1,(Sheet1!A$3:A$7000=A3)*(Sheet1!B$ 3:B$7000=B3)*(Sheet1!C$3:C$7000=C3)*(Sheet1!D$3:D$ 7000=D3)*(Sheet1!D$3:D$7000=D3)*(Sheet1!F$3:F$7000 =F3),0)),0,INDEX(Sheet1!G$3:G$7000,MATCH(1,(Sheet1 !A$3:A$7000=A3)*(Sheet1!B$3:B$7000=B3)*(Sheet1!C$3 :C$7000=C3)*(Sheet1!D$3:D$7000=D3)*(Sheet1!D$3:D$7 000=D3)*(Sheet1!F$3:F$7000=F3),0)))

Adapt the ranges to suit your actuals ..

Since the above is quite calc intensive, you might want to set the calc mode
to manual before proceeding. Click Tools Options Calculation tab Check
"Manual" OK. Then do the formula fills, and press F9 to recalc when ready
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Eddy Stan" wrote:
Hi
I have 2 sheets
sheet1 has july data and sheet2 has august data (7000 rows data)
each with 8 column data
8th column has the status value like good, spoiled, damaged, repaired.. so
on (8values)
the data in july & august are not in the regular row order.
So in the august sheet col A to F has to be searched with July A to F colum
and if everything matches i need value in July G column to be placed in Aug
G col.
i want the function to be placed in Aug sheet G colum. So that i can copy
the forumula down 7000 rows, if doesnt match then zero or error value need to
be displayed.
So far i tackle this issue like a3&b3&c3&d3&e3&f3 in column A (inserted
colum) in july and similarly in August sheet, then use vlookup()
Advance thanks for help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default vlookup or dget with multiple condition - help please

Oops, small typo he
.. array-enter the formula by pressing CRL+SHIFT+ENTER:


it should read as:
.. array-enter the formula by pressing CTRL+SHIFT+ENTER:


If you do the array-entering correctly, Excel will wrap curly braces { }
around the formula (look within the formula bar). Use this as a visual check
that the array-entering is correctly done, before you copy down. If you don't
see the curlies, you have to try again. Re-click inside the formula bar,
press CTRL+SHIFT+ENTER.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default vlookup or dget with multiple condition - help please

Hi Max,
Superb. I am really happy.
Generally when we use match() function we give match(lukupvalue, array, 0)
but you have 1 in the lookup value. why how does the match know what i am
looking for, actually in the array you have given my lookup value !.
Secondly the index() - you gave the result array, match function to find
row, but didnot give anything to find rowno. is it because the gave the
result array in start.
Can you explain me how it worked, if possible, in a logical way, so that i
can think in the same way next time.
Thank you very much.


"Max" wrote:

Assume identically structured data in Sheets 1 and 2, cols A to F, data from
row3 down to row7000?

In Sheet2 (for August),

Put this in G3 and array-enter the formula by pressing CRL+SHIFT+ENTER:
=INDEX(Sheet1!G$3:G$7000,MATCH(1,(Sheet1!A$3:A$700 0=A3)*(Sheet1!B$3:B$7000=B3)*(Sheet1!C$3:C$7000=C3 )*(Sheet1!D$3:D$7000=D3)*(Sheet1!D$3:D$7000=D3)*(S heet1!F$3:F$7000=F3),0))
Copy G3 down as far as required.

And if you want an error trap to return zeros for any non-matches found, put
this instead in G3, array-enter, copy down:
=IF(ISNA(MATCH(1,(Sheet1!A$3:A$7000=A3)*(Sheet1!B$ 3:B$7000=B3)*(Sheet1!C$3:C$7000=C3)*(Sheet1!D$3:D$ 7000=D3)*(Sheet1!D$3:D$7000=D3)*(Sheet1!F$3:F$7000 =F3),0)),0,INDEX(Sheet1!G$3:G$7000,MATCH(1,(Sheet1 !A$3:A$7000=A3)*(Sheet1!B$3:B$7000=B3)*(Sheet1!C$3 :C$7000=C3)*(Sheet1!D$3:D$7000=D3)*(Sheet1!D$3:D$7 000=D3)*(Sheet1!F$3:F$7000=F3),0)))

Adapt the ranges to suit your actuals ..

Since the above is quite calc intensive, you might want to set the calc mode
to manual before proceeding. Click Tools Options Calculation tab Check
"Manual" OK. Then do the formula fills, and press F9 to recalc when ready
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Eddy Stan" wrote:
Hi
I have 2 sheets
sheet1 has july data and sheet2 has august data (7000 rows data)
each with 8 column data
8th column has the status value like good, spoiled, damaged, repaired.. so
on (8values)
the data in july & august are not in the regular row order.
So in the august sheet col A to F has to be searched with July A to F colum
and if everything matches i need value in July G column to be placed in Aug
G col.
i want the function to be placed in Aug sheet G colum. So that i can copy
the forumula down 7000 rows, if doesnt match then zero or error value need to
be displayed.
So far i tackle this issue like a3&b3&c3&d3&e3&f3 in column A (inserted
colum) in july and similarly in August sheet, then use vlookup()
Advance thanks for help.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default vlookup or dget with multiple condition - help please

First, my apologies. Think I missed including col E within the MATCH lookup
array earlier. I had a double instead for col D.

This part:
... *(Sheet1!D$3:D$7000=D3)*(Sheet1!D$3:D$7000=D3)* ...

should have read as:
... *(Sheet1!D$3:D$7000=D3)*(Sheet1!E$3:E$7000=E3)* ...

Trust the above typo was caught / corrected
in the earlier expressions when you applied them


As for why a "1" is used as the lookup value within:
MATCH(1, lookup array, 0)

It's because the lookup array in the MATCH, this part:
(Sheet1!A$3:A$7000=A3)*(Sheet1!B$3:B$7000=B3)*(... )*(...)*..
will ultimately resolve to an array of ones/zeros, eg: {0;0;1;0;0;0;0;...}
depending on where the multiple criteria is satisfied (1's), or not (0's)

Using the lookup value: 1 in MATCH would hence give us the (1st) matching
position within the array where the multiple criteria is satisfied. It's
presumed of course, that there should be only a single matching position (ie
a single/unique instance of 1) to be returned within the array. That position
returned (a number) is then used by the INDEX part of the expression, eg:
INDEX(Sheet1!G$3:G$7000, ...) to yield the required result. Hope the above
clarifies it.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Eddy Stan" wrote:
Hi Max,
Superb. I am really happy.
Generally when we use match() function we give match(lukupvalue, array, 0)
but you have 1 in the lookup value. why how does the match know what i am
looking for, actually in the array you have given my lookup value !.
Secondly the index() - you gave the result array, match function to find
row, but didnot give anything to find rowno. is it because the gave the
result array in start.
Can you explain me how it worked, if possible, in a logical way, so that i
can think in the same way next time.
Thank you very much.


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
Trouble with DGET & VLOOKUP formulas amethyst Excel Discussion (Misc queries) 2 March 15th 07 12:21 PM
DGet vs VLookup earth21994 Excel Worksheet Functions 3 July 26th 06 09:31 PM
VLOOKUP and DGET to find a value with multiple criterion jaybird2307 Excel Worksheet Functions 8 June 28th 06 03:03 PM
dynamic, double vlookup, match, index, dget?? different workbooks Leslie Excel Worksheet Functions 11 June 27th 05 09:45 PM
At my wit's end! Use DGET or VLOOKUP to select data???? Allen Excel Worksheet Functions 1 March 8th 05 01:48 PM


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