#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default vlookout and if

I am basically having 2 times 2 columns of data that i have to compare
and find if it matches (i am comparing existing inventory with the
inventory we would most urgently need):

it would look approximately like this:

1 2 3 4 5
Part# quantity Part# quantity
V90mdm 3 vxcvxc 1
Gmcrd 7 CDROM 0
Opmse 7 CDRW 1
Wlopm 3 dfdf 3
Ethernt 8 dsa 0
CDROM 2 DVDRW 2
CDRW 1 Ethernt 8
DVDRW 2 fasd 0
Th128 4 Gmcrd 4
Th256 6 Opmse 0
sag 3
Th128 4
Th256 6
V90mdm 1
vcx 7
vcxz 7
vxcz 0
Wlopm 0

where I would have to find out in column3 if the column 1(part#) and
column 2(part quantity) exactly match with the columns 4 and 5. column3
would have to display answers like yes (enough stock) or no(not enough
stock) or even display the number of missing parts. however it might
also happen that there is no part in column4 at all.

I have already tried with various formulas including if and isna and
vlookup but couldn't make it work for 2 criteria together. i only
managed to find out the match from column 1 and column 4 and display it
as yes or no in column3.

does anyone have any suggestions, please?

Thx.

Tom

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default vlookout and if

Maybe
=IF(ISNA(VLOOKUP(A3,$D$3:$E$20,2,0)),"",CHOOSE((B3 =VLOOKUP(A3,$D$3:$E$20,2,0))+1,"no","yes"))



" wrote:

I am basically having 2 times 2 columns of data that i have to compare
and find if it matches (i am comparing existing inventory with the
inventory we would most urgently need):

it would look approximately like this:

1 2 3 4 5
Part# quantity Part# quantity
V90mdm 3 vxcvxc 1
Gmcrd 7 CDROM 0
Opmse 7 CDRW 1
Wlopm 3 dfdf 3
Ethernt 8 dsa 0
CDROM 2 DVDRW 2
CDRW 1 Ethernt 8
DVDRW 2 fasd 0
Th128 4 Gmcrd 4
Th256 6 Opmse 0
sag 3
Th128 4
Th256 6
V90mdm 1
vcx 7
vcxz 7
vxcz 0
Wlopm 0

where I would have to find out in column3 if the column 1(part#) and
column 2(part quantity) exactly match with the columns 4 and 5. column3
would have to display answers like yes (enough stock) or no(not enough
stock) or even display the number of missing parts. however it might
also happen that there is no part in column4 at all.

I have already tried with various formulas including if and isna and
vlookup but couldn't make it work for 2 criteria together. i only
managed to find out the match from column 1 and column 4 and display it
as yes or no in column3.

does anyone have any suggestions, please?

Thx.

Tom


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 459
Default vlookout and if

wrote:
I am basically having 2 times 2 columns of data that i have to compare
and find if it matches (i am comparing existing inventory with the
inventory we would most urgently need):

it would look approximately like this:

1 2 3 4 5
Part# quantity Part# quantity
V90mdm 3 vxcvxc 1
Gmcrd 7 CDROM 0
Opmse 7 CDRW 1
Wlopm 3 dfdf 3
Ethernt 8 dsa 0
CDROM 2 DVDRW 2
CDRW 1 Ethernt 8
DVDRW 2 fasd 0
Th128 4 Gmcrd 4
Th256 6 Opmse 0
sag 3
Th128 4
Th256 6
V90mdm 1
vcx 7
vcxz 7
vxcz 0
Wlopm 0

where I would have to find out in column3 if the column 1(part#) and
column 2(part quantity) exactly match with the columns 4 and 5.
column3 would have to display answers like yes (enough stock) or
no(not enough stock) or even display the number of missing parts.
however it might also happen that there is no part in column4 at all.

I have already tried with various formulas including if and isna and
vlookup but couldn't make it work for 2 criteria together. i only
managed to find out the match from column 1 and column 4 and display
it as yes or no in column3.

does anyone have any suggestions, please?

Thx.

Tom


Hi Tom,

try this formula in C2 then copy down:

=IF(ISNA(VLOOKUP(D2,$A$2:$B$19,2,0)),"",IF(B2-VLOOKUP(D2,$A$2:$B$19,2,0)0,"OK",ABS(B2-VLOOKUP(D2,$A$2:$B$19,2,0))))

where $A$2:$B$19 are the columns with existing inventory (columns 1 and 2 in
your example), while D2:E11 are the columns with needed inventory (columns 4
and 5 in your example), and column C is where to check if existing inventory
has enough stock for your needs (your column 3).

Adjust references as for your conveniences.

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 459
Default vlookout and if

Franz Verga wrote:
wrote:
I am basically having 2 times 2 columns of data that i have to
compare and find if it matches (i am comparing existing inventory
with the inventory we would most urgently need):

it would look approximately like this:

1 2 3 4 5
Part# quantity Part# quantity
V90mdm 3 vxcvxc 1
Gmcrd 7 CDROM 0
Opmse 7 CDRW 1
Wlopm 3 dfdf 3
Ethernt 8 dsa 0
CDROM 2 DVDRW 2
CDRW 1 Ethernt 8
DVDRW 2 fasd 0
Th128 4 Gmcrd 4
Th256 6 Opmse 0
sag 3
Th128 4
Th256 6
V90mdm 1
vcx 7
vcxz 7
vxcz 0
Wlopm 0

where I would have to find out in column3 if the column 1(part#) and
column 2(part quantity) exactly match with the columns 4 and 5.
column3 would have to display answers like yes (enough stock) or
no(not enough stock) or even display the number of missing parts.
however it might also happen that there is no part in column4 at all.

I have already tried with various formulas including if and isna and
vlookup but couldn't make it work for 2 criteria together. i only
managed to find out the match from column 1 and column 4 and display
it as yes or no in column3.

does anyone have any suggestions, please?

Thx.

Tom


Hi Tom,

try this formula in C2 then copy down:

=IF(ISNA(VLOOKUP(D2,$A$2:$B$19,2,0)),"",IF(B2-VLOOKUP(D2,$A$2:$B$19,2,0)0,"OK",ABS(B2-VLOOKUP(D2,$A$2:$B$19,2,0))))

where $A$2:$B$19 are the columns with existing inventory (columns 1
and 2 in your example), while D2:E11 are the columns with needed
inventory (columns 4 and 5 in your example), and column C is where to
check if existing inventory has enough stock for your needs (your
column 3).
Adjust references as for your conveniences.



Correction...

This one should be much more bette than my previous; type (or copy and past)
this formula in E2 then copy down:

=IF(ISNA(VLOOKUP(C2,$A$2:$B$19,2,0)),IF(D20,D2,"O K"),IF(VLOOKUP(C2,$A$2:$B$19,2,0)-D2=0,"OK",ABS(VLOOKUP(C2,$A$2:$B$19,2,0)-D2)))

where $A$2:$B$19 are the columns with existing inventory (columns 1 and 2 in
your example), while C2:D11 are the columns with needed inventory (columns 4
and 5 in your example), and column E is where to check existing inventory
vs. your needs (your column 3).

--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default vlookout and if

Your original post said you wanted to check if the amounts were exactly
equal, but Franz's interpretation makes more sense to me (if you have enough
inventory to cover your needs, shouldn't the result be "yes"?) If the
parts/amounts needed is in A3:B12, the parts/amounts in inventory are in
D3:E20, then I would change my formula to this, put it in C3 and copy down:

=IF(ISNA(VLOOKUP(A3,$D$3:$E$20,2,0)),"",CHOOSE((B3 <VLOOKUP(A3,$D$3:$E$20,2,0))+1,"no ","yes ")&ABS(B3-VLOOKUP(A3,$D$3:$E$20,2,0)))

"JMB" wrote:

Maybe
=IF(ISNA(VLOOKUP(A3,$D$3:$E$20,2,0)),"",CHOOSE((B3 =VLOOKUP(A3,$D$3:$E$20,2,0))+1,"no","yes"))



" wrote:

I am basically having 2 times 2 columns of data that i have to compare
and find if it matches (i am comparing existing inventory with the
inventory we would most urgently need):

it would look approximately like this:

1 2 3 4 5
Part# quantity Part# quantity
V90mdm 3 vxcvxc 1
Gmcrd 7 CDROM 0
Opmse 7 CDRW 1
Wlopm 3 dfdf 3
Ethernt 8 dsa 0
CDROM 2 DVDRW 2
CDRW 1 Ethernt 8
DVDRW 2 fasd 0
Th128 4 Gmcrd 4
Th256 6 Opmse 0
sag 3
Th128 4
Th256 6
V90mdm 1
vcx 7
vcxz 7
vxcz 0
Wlopm 0

where I would have to find out in column3 if the column 1(part#) and
column 2(part quantity) exactly match with the columns 4 and 5. column3
would have to display answers like yes (enough stock) or no(not enough
stock) or even display the number of missing parts. however it might
also happen that there is no part in column4 at all.

I have already tried with various formulas including if and isna and
vlookup but couldn't make it work for 2 criteria together. i only
managed to find out the match from column 1 and column 4 and display it
as yes or no in column3.

does anyone have any suggestions, please?

Thx.

Tom


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



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