Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Vlookup function to solve the below problem



Hi
HAve a problem:
I am require to take out the ppl who pass certain subject with the
formula. I am stuck in the last part

I am require to print out in words who have pass certain subject.
Example
A B C D
1 math English Science
2 Max 90 40 30
3 Rick 80 30 70
4 May 40 80 90
5 June 80 70 60
6 David 40 60 70

By using "If" function for result 50
I got this
E F G
2 1 0 0
3 1 0 1
4 0 1 1
5 1 1 1
6 0 1 1

Than by creating a table for Vlookup to return for the number : So that
they can print out the words using Vlookup.
A B C D
10 0 0 0 Fail all subject
11 0 0 1 Pass Science
12 0 1 0 Pass English
13 0 1 1 Pass English and Science
14 1 0 0 Pass Math
15 1 0 1 Pass Math and Science
16 1 1 0 Pass Math and English
17 1 1 1 Pass all subject

But Vlookup cannot look for a matching more than a cell.
Over here they need to look for three matching cell in a row in order to
reflect the value.

I turn with this formula
VLOOKUP(E2:G2,A10:D17,2,FALSE)

But the resule come out "#VALUE!"
Pls help.
Any other formula i can use. Or i need to add some stuff to Vlookup .



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Using Vlookup function to solve the below problem

I created a table in A1:B8 of sheet2 that looked like:
000 Fail all subject
001 Pass Science
010 Pass English
011 Pass English and Science
100 Pass Math
101 Pass Math and Science
110 Pass Math and English
111 Pass all subject

I formatted column A as text before I typed in that data--I didn't want the
values treated as number, I wanted them Text.

Then in E2 of sheet1, I put this formula:
=VLOOKUP(--(B250)&--(C250)&--(D250),Sheet2!A:B,2,FALSE)

--(b250) will return 0 or 1 (same with --(c250) and --(d250))
And the & means that the concatenation will be text--to match what's in column A
of Sheet2.

Joe Ng wrote:

Hi
HAve a problem:
I am require to take out the ppl who pass certain subject with the
formula. I am stuck in the last part

I am require to print out in words who have pass certain subject.
Example
A B C D
1 math English Science
2 Max 90 40 30
3 Rick 80 30 70
4 May 40 80 90
5 June 80 70 60
6 David 40 60 70

By using "If" function for result 50
I got this
E F G
2 1 0 0
3 1 0 1
4 0 1 1
5 1 1 1
6 0 1 1

Than by creating a table for Vlookup to return for the number : So that
they can print out the words using Vlookup.
A B C D
10 0 0 0 Fail all subject
11 0 0 1 Pass Science
12 0 1 0 Pass English
13 0 1 1 Pass English and Science
14 1 0 0 Pass Math
15 1 0 1 Pass Math and Science
16 1 1 0 Pass Math and English
17 1 1 1 Pass all subject

But Vlookup cannot look for a matching more than a cell.
Over here they need to look for three matching cell in a row in order to
reflect the value.

I turn with this formula
VLOOKUP(E2:G2,A10:D17,2,FALSE)

But the resule come out "#VALUE!"
Pls help.
Any other formula i can use. Or i need to add some stuff to Vlookup .

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson
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
excel function solve problem? douglas Excel Worksheet Functions 2 March 30th 09 04:36 AM
how can I solve this problem? Please help me theinzaw Excel Discussion (Misc queries) 0 December 13th 08 12:09 PM
How do I solve a vlookup when multiple records are available? Chris Excel Worksheet Functions 2 November 26th 08 11:59 PM
How to solve this problem? jackoat Excel Programming 3 August 3rd 05 03:12 PM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"