Solved

Calculating one field with multiples getting data from another

Posted on 2011-03-01
14
225 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
Comment Utility
=if(A1=c2,D2,if(A1=C1,d1,""))


kr
Eric
0
 
LVL 30

Expert Comment

by:SiddharthRout
Comment Utility
=If(A1=C1,D1,if(A1=C2,D2,""))

Sid
0
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
Comment Utility
paste this in B1

kr Eric
0
 
LVL 30

Expert Comment

by:SiddharthRout
Comment Utility
=If(A1=C1,D1,if(A1=C2,D2,""))

Sid
0
 
LVL 9

Expert Comment

by:sah18
Comment Utility
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
Comment Utility
Too Slow...

Sid
0
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 30

Expert Comment

by:SiddharthRout
Comment Utility
cebasso: Please ignore ID: 35008120

There was some problem with the browser...

Sid
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Perfect! Thanks everybody!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now