Solved

Calculating one field with multiples getting data from another

Posted on 2011-03-01
14
228 Views
Last Modified: 2013-11-05
Hello,

Can somebody tell me how to make the following logical sentence

Example

B1 = IF A1 = C1 THEN B1 will be = D1 but if A1 = C2 THEN B1 will be = D2 understand?

in A1 i'll type some value, if its equal C1,C2,C3 for example, B1 will be = D(RESPECTIVE SEQUENCE FROM C)

Some idea?

Regards
0
Comment
Question by:cebasso
  • 5
  • 4
  • 2
  • +2
14 Comments
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 35008092
=if(A1=c2,D2,if(A1=C1,d1,""))


kr
Eric
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35008103
=If(A1=C1,D1,if(A1=C2,D2,""))

Sid
0
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 35008112
paste this in B1

kr Eric
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35008120
=If(A1=C1,D1,if(A1=C2,D2,""))

Sid
0
 
LVL 9

Expert Comment

by:sah18
ID: 35008122
Place this in B1:

=VLOOKUP(A1,C:D,2)

Note:  for this to work, your column C must be in ascending sort order.
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35008123
Too Slow...

Sid
0
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 35008139
He Sid I think the A1=C2 has priority over A1=C1?

If it is so mine is right one if not yours is the right one....

kr

Eric
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35008143
cebasso: Please ignore ID: 35008120

There was some problem with the browser...

Sid
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35008165
I'd go with the VLOOKUP, but you need FALSE as the 4th argument, i.e. iin B1

VLOOKUP(A1,C:D,2,0)

nothing needs sorting

regards, barry
0
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 35008192
He Cebasso,

Do you understand the function if the IF statement?

=IF(true or false statement, value if tru,value if false)
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35008196
Ah. I see what you mean....

Yes you are right. I didn't quite catch the priority part.

Sid
0
 
LVL 4

Author Comment

by:cebasso
ID: 35008208
He Cebasso,
Do you understand the function if the IF statement?
=IF(true or false statement, value if tru,value if false)


Yeap, i understand... i know about logical sentences except for Excel, i dont know how to interpret it hehe
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35008217
also in the last part C3 is mentioned so I think the Asker wants to look beyond row 2. VLOOKUP will work even for 2 rows but is certainly the correct option for more, I think

....I said use FALSE but then used zero, they do the same, so it can be either

=VLOOKUP(A1,C:D,2,0)

or

=VLOOKUP(A1,C:D,2,FALSE)

regards, barry
0
 
LVL 4

Author Closing Comment

by:cebasso
ID: 35008277
Perfect! Thanks everybody!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question