Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how do I do a formuls in excel such as (if a1=somthing then b1=a .
how do I do a formula in excel such as if A1=something then b1= a set value ?
|
#2
|
|||
|
|||
type this in B1
=if(A1="somestring",thesetvalue,"") this means if A1 =somestring then the cell where you put the formula is=setvalue, otherwise the cell is blank Brett wrote in message ... how do I do a formula in excel such as if A1=something then b1= a set value ? |
#3
|
|||
|
|||
Brett,
If you are dealing with just numbers, you can use Boolean logic too. This formula says "if A1=1 then 5 else if A1=2 then 6". =((A1=1)*5) + ((A1=2)*6) If you want all of the conditions to be true in order to return a value, substitute the plus sign for a multiplication sign. Boolean logic is also a way to get around the nested IF limitations. ---- Regards, John Mansfield http://www.pdbook.com "Brett" wrote: how do I do a formula in excel such as if A1=something then b1= a set value ? |
#4
|
|||
|
|||
I would think the easiest way would be to use the "IF" function and an
absolute value. Pick a cell to be your "absolute" or as you put it "set" value. Just for kicks say that cell is A50. Your set /absolute value in that cell is 100. Your IF function goes into cell B1. Let's assume you want to say this: If the value in A1 is greater than or equal to the absolute value in cell A50, then the value in cell B1 is 25. If not, the value is 0. Here's the easiest way to do that: 1. Enter the number 100 in Cell A50 2. Enter the number 150 in Cell A1 2. Click on cell B1 3. enter the = sign 4. Use the arrow in your function box and select the IF function. This will open the IF function dialog box 5. Click in the Logical Test Box and then click on cell A1. After Excel enters A1 you add =$A$50. In effect, at this point you have told Excel to see if the value in cell A1(150) is greater than or equal to the set value in cell A50(100). The $ have to be entered to make that value "set." Since it is greater than that value, the word "True" should appear at the end of the first dialog bax. If it does, you have a correct test and can go on to step 6. If it doesn't, you have done something wrong. 6. Go to the "If True" box and type in 25. 7. Go to the "If False" box and type in 0. You're done! If you have done it right, the value in cell B1 should be 25. Now go back to cell A1 and change it to 95. Since this is less than 100, your value in B1 should now be 0. Hope this wasn't too confusing! Logical test: "Brett" wrote: how do I do a formula in excel such as if A1=something then b1= a set value ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
How do I isolate my Excel server (automation) from other Excel instances? | Excel Discussion (Misc queries) | |||
sharing/using/saving Excel 2002 files in Excel 2003 | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) | |||
VB Automation is Whacking out my Excel Environment | Excel Discussion (Misc queries) |