PC Review


Reply
Thread Tools Rate Thread

Big Problem using VLOOKUP formula

 
 
jessie
Guest
Posts: n/a
 
      20th Dec 2006
Hi guys,

I am facing a tedious problem using the VLOOKUP formula.
First of all I give to all a clear picture on what I want to do.

For ex:
A1 -> 1 B1->100 C1->2 D1->500 E1->1
A2 -> 3 B2->200 C2->4 D2->600 E2->2
A2 -> 5 B3->300 C3->6 D3->700 E3->3
A2 -> 7 B4->400 C4->8 D4->800 E4->4

I have to create a coloumn F that contains the values contained on the
coloumn B or C depending if the values on E are found in the A or C
coloumns.

So F should be:

F1->100
F2->500
F3->200
F4->600
.....

I have created this formula:

IF(ISNA(VLOOKUP(F1,$A$1:$B$4,2,FALSE)),VLOOKUP(F1,$C$1:$D$4,4,FALSE),VLOOKUP(F1,$A$1:$B$4,2,FALSE))

But in the case of F2 is not working.. It seems that even if I select
as table_array the range C14 is always checking in the coloumn A.

Anyone could help me to understand how to solve this problem?

I hope is clear.

Thanks.
BR,
Jessie

 
Reply With Quote
 
 
 
 
Charles Williams
Guest
Posts: n/a
 
      20th Dec 2006
Try something like this:
=IF(isna(MATCH(E1,$A$1:$A$4,0)),INDEX($D$1:$D$4,MATCH(E1,$C$1:$C$4,0),1),INDEX($D$1:$D$4,MATCH(E1,$A$1:$A$4,0),1))

regards
Charles
______________________
Decision Models
FastExcel 2.3 now available
Name Manager 4.0 now available
www.DecisionModels.com

"jessie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi guys,
>
> I am facing a tedious problem using the VLOOKUP formula.
> First of all I give to all a clear picture on what I want to do.
>
> For ex:
> A1 -> 1 B1->100 C1->2 D1->500 E1->1
> A2 -> 3 B2->200 C2->4 D2->600 E2->2
> A2 -> 5 B3->300 C3->6 D3->700 E3->3
> A2 -> 7 B4->400 C4->8 D4->800 E4->4
>
> I have to create a coloumn F that contains the values contained on the
> coloumn B or C depending if the values on E are found in the A or C
> coloumns.
>
> So F should be:
>
> F1->100
> F2->500
> F3->200
> F4->600
> ....
>
> I have created this formula:
>
> IF(ISNA(VLOOKUP(F1,$A$1:$B$4,2,FALSE)),VLOOKUP(F1,$C$1:$D$4,4,FALSE),VLOOKUP(F1,$A$1:$B$4,2,FALSE))
>
> But in the case of F2 is not working.. It seems that even if I select
> as table_array the range C14 is always checking in the coloumn A.
>
> Anyone could help me to understand how to solve this problem?
>
> I hope is clear.
>
> Thanks.
> BR,
> Jessie
>



 
Reply With Quote
 
jessie
Guest
Posts: n/a
 
      20th Dec 2006
Charles using your formula the result of coloumn F is not the expected
one but the following:

F1->500
F2->500
F3->600
F4->600
......

What's worng?

Thanks for your help.

BR,
Jessie


Charles Williams wrote:
> Try something like this:
> =IF(isna(MATCH(E1,$A$1:$A$4,0)),INDEX($D$1:$D$4,MATCH(E1,$C$1:$C$4,0),1),INDEX($D$1:$D$4,MATCH(E1,$A$1:$A$4,0),1))
>
> regards
> Charles
> ______________________
> Decision Models
> FastExcel 2.3 now available
> Name Manager 4.0 now available
> www.DecisionModels.com
>
> "jessie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi guys,
> >
> > I am facing a tedious problem using the VLOOKUP formula.
> > First of all I give to all a clear picture on what I want to do.
> >
> > For ex:
> > A1 -> 1 B1->100 C1->2 D1->500 E1->1
> > A2 -> 3 B2->200 C2->4 D2->600 E2->2
> > A2 -> 5 B3->300 C3->6 D3->700 E3->3
> > A2 -> 7 B4->400 C4->8 D4->800 E4->4
> >
> > I have to create a coloumn F that contains the values contained on the
> > coloumn B or C depending if the values on E are found in the A or C
> > coloumns.
> >
> > So F should be:
> >
> > F1->100
> > F2->500
> > F3->200
> > F4->600
> > ....
> >
> > I have created this formula:
> >
> > IF(ISNA(VLOOKUP(F1,$A$1:$B$4,2,FALSE)),VLOOKUP(F1,$C$1:$D$4,4,FALSE),VLOOKUP(F1,$A$1:$B$4,2,FALSE))
> >
> > But in the case of F2 is not working.. It seems that even if I select
> > as table_array the range C14 is always checking in the coloumn A.
> >
> > Anyone could help me to understand how to solve this problem?
> >
> > I hope is clear.
> >
> > Thanks.
> > BR,
> > Jessie
> >


 
Reply With Quote
 
jessie
Guest
Posts: n/a
 
      20th Dec 2006
I found the error, the correct formula is:

=IF(ISNA(MATCH(E1,$A$1:$A$4,0)),INDEX($D$1:$D$4,MATCH(E1,$C$1:$C$4,0),1),INDEX($B$1:$B$4,MATCH(E1,$A$1:$A$4,0),1))

Thanks again
BR,
Jessie

jessie wrote:
> Charles using your formula the result of coloumn F is not the expected
> one but the following:
>
> F1->500
> F2->500
> F3->600
> F4->600
> .....
>
> What's worng?
>
> Thanks for your help.
>
> BR,
> Jessie
>
>
> Charles Williams wrote:
> > Try something like this:
> > =IF(isna(MATCH(E1,$A$1:$A$4,0)),INDEX($D$1:$D$4,MATCH(E1,$C$1:$C$4,0),1),INDEX($D$1:$D$4,MATCH(E1,$A$1:$A$4,0),1))
> >
> > regards
> > Charles
> > ______________________
> > Decision Models
> > FastExcel 2.3 now available
> > Name Manager 4.0 now available
> > www.DecisionModels.com
> >
> > "jessie" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi guys,
> > >
> > > I am facing a tedious problem using the VLOOKUP formula.
> > > First of all I give to all a clear picture on what I want to do.
> > >
> > > For ex:
> > > A1 -> 1 B1->100 C1->2 D1->500 E1->1
> > > A2 -> 3 B2->200 C2->4 D2->600 E2->2
> > > A2 -> 5 B3->300 C3->6 D3->700 E3->3
> > > A2 -> 7 B4->400 C4->8 D4->800 E4->4
> > >
> > > I have to create a coloumn F that contains the values contained on the
> > > coloumn B or C depending if the values on E are found in the A or C
> > > coloumns.
> > >
> > > So F should be:
> > >
> > > F1->100
> > > F2->500
> > > F3->200
> > > F4->600
> > > ....
> > >
> > > I have created this formula:
> > >
> > > IF(ISNA(VLOOKUP(F1,$A$1:$B$4,2,FALSE)),VLOOKUP(F1,$C$1:$D$4,4,FALSE),VLOOKUP(F1,$A$1:$B$4,2,FALSE))
> > >
> > > But in the case of F2 is not working.. It seems that even if I select
> > > as table_array the range C14 is always checking in the coloumn A.
> > >
> > > Anyone could help me to understand how to solve this problem?
> > >
> > > I hope is clear.
> > >
> > > Thanks.
> > > BR,
> > > Jessie
> > >


 
Reply With Quote
 
Charles Williams
Guest
Posts: n/a
 
      20th Dec 2006
Oops, well done to fix it.

regards
Charles
______________________
Decision Models
FastExcel 2.3 now available
Name Manager 4.0 now available
www.DecisionModels.com

"jessie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I found the error, the correct formula is:
>
> =IF(ISNA(MATCH(E1,$A$1:$A$4,0)),INDEX($D$1:$D$4,MATCH(E1,$C$1:$C$4,0),1),INDEX($B$1:$B$4,MATCH(E1,$A$1:$A$4,0),1))
>
> Thanks again
> BR,
> Jessie
>
> jessie wrote:
>> Charles using your formula the result of coloumn F is not the expected
>> one but the following:
>>
>> F1->500
>> F2->500
>> F3->600
>> F4->600
>> .....
>>
>> What's worng?
>>
>> Thanks for your help.
>>
>> BR,
>> Jessie
>>
>>
>> Charles Williams wrote:
>> > Try something like this:
>> > =IF(isna(MATCH(E1,$A$1:$A$4,0)),INDEX($D$1:$D$4,MATCH(E1,$C$1:$C$4,0),1),INDEX($D$1:$D$4,MATCH(E1,$A$1:$A$4,0),1))
>> >
>> > regards
>> > Charles
>> > ______________________
>> > Decision Models
>> > FastExcel 2.3 now available
>> > Name Manager 4.0 now available
>> > www.DecisionModels.com
>> >
>> > "jessie" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> > > Hi guys,
>> > >
>> > > I am facing a tedious problem using the VLOOKUP formula.
>> > > First of all I give to all a clear picture on what I want to do.
>> > >
>> > > For ex:
>> > > A1 -> 1 B1->100 C1->2 D1->500 E1->1
>> > > A2 -> 3 B2->200 C2->4 D2->600 E2->2
>> > > A2 -> 5 B3->300 C3->6 D3->700 E3->3
>> > > A2 -> 7 B4->400 C4->8 D4->800 E4->4
>> > >
>> > > I have to create a coloumn F that contains the values contained on
>> > > the
>> > > coloumn B or C depending if the values on E are found in the A or C
>> > > coloumns.
>> > >
>> > > So F should be:
>> > >
>> > > F1->100
>> > > F2->500
>> > > F3->200
>> > > F4->600
>> > > ....
>> > >
>> > > I have created this formula:
>> > >
>> > > IF(ISNA(VLOOKUP(F1,$A$1:$B$4,2,FALSE)),VLOOKUP(F1,$C$1:$D$4,4,FALSE),VLOOKUP(F1,$A$1:$B$4,2,FALSE))
>> > >
>> > > But in the case of F2 is not working.. It seems that even if I select
>> > > as table_array the range C14 is always checking in the coloumn A.
>> > >
>> > > Anyone could help me to understand how to solve this problem?
>> > >
>> > > I hope is clear.
>> > >
>> > > Thanks.
>> > > BR,
>> > > Jessie
>> > >

>



 
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
Problem with using Vlookup formula Montu Microsoft Excel Worksheet Functions 4 3rd Oct 2008 06:33 AM
PROBLEM WITH INDIRECT & VLOOKUP FORMULA =?Utf-8?B?VGFueWE=?= Microsoft Excel Worksheet Functions 11 11th Oct 2007 02:17 PM
Vlookup/If? Formula problem? =?Utf-8?B?TGFuZ29vc2U=?= Microsoft Excel New Users 1 27th Apr 2006 05:59 PM
Problem with VLOOKUP formula BigH Microsoft Excel Worksheet Functions 2 14th Dec 2005 08:36 PM
Vlookup, What is correct formula for problem below? =?Utf-8?B?QmlsbCBS?= Microsoft Excel Worksheet Functions 7 2nd Aug 2005 04:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.