Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Brett
 
Posts: n/a
Default 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   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

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   Report Post  
John Mansfield
 
Posts: n/a
Default

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   Report Post  
Patrick
 
Posts: n/a
Default

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
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 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How do I isolate my Excel server (automation) from other Excel instances? Joseph Geretz Excel Discussion (Misc queries) 5 July 19th 13 03:18 PM
sharing/using/saving Excel 2002 files in Excel 2003 maze2009 Excel Discussion (Misc queries) 0 January 20th 05 07:27 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM
VB Automation is Whacking out my Excel Environment Joseph Geretz Excel Discussion (Misc queries) 2 December 29th 04 03:49 PM


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

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

About Us

"It's about Microsoft Excel"