Home |
Search |
Today's Posts |
#1
|
|||
|
|||
IF/AND formulas within excel
Hi there,
Could anybody please help me with a formula i am trying to enter into my excel spreadsheet. i have two sets of variables "a" and "b" which are related to each other. Using a seperate formula I obtain "c" What i would like to do is apply 1 of 4 equations to "c" depending on the value of "a" and "b". if "a"0 and "b"0 then "c" stays as it is "a"<0 and "b"0 then minus"c" from 360 "a"0 and "b"<0 then minus"c" from 180 "a"<0 and "b"<0 then "c" plus 180 Is it at all possible to formulate the above?? Thanks for any help Mark |
#3
|
|||
|
|||
Hi mark,
See if this works: A1 B1 C1 # # # In D1 type =IF(AND(A10,B10),C1,IF(AND(A1<0,B10),360-C1,IF(AND(A10,B1<0),180-C1,IF(AND(A1<0,B1<0),180+C1,"ERROR")))) it worked for me. HTH cwilson "mark.ew" wrote: Hi there, Could anybody please help me with a formula i am trying to enter into my excel spreadsheet. i have two sets of variables "a" and "b" which are related to each other. Using a seperate formula I obtain "c" What i would like to do is apply 1 of 4 equations to "c" depending on the value of "a" and "b". if "a"0 and "b"0 then "c" stays as it is "a"<0 and "b"0 then minus"c" from 360 "a"0 and "b"<0 then minus"c" from 180 "a"<0 and "b"<0 then "c" plus 180 Is it at all possible to formulate the above?? Thanks for any help Mark |
#4
|
|||
|
|||
"a" "b" "c" are indicative only. I have true numerical values for them. What
i would like to do is enter a formula, that would have excel analyse cells "va" and "vb" and then depending on the permutations of "va" and "vb" being positive or negative, apply one of the equations. I have a couple hundred sets of "va" and "vb" cells, so it would save alot of time, if it was possible to enter a formula, rather than manually checking each set. Is it possible to input one formula that contains all four equations below, but that would only apply the correct one based on positives and negatives of "va" and "vb" "Don Guillett" wrote: I suggest changing your variable names to va, vb,vc and then nesting the if's -- Don Guillett SalesAid Software "mark.ew" wrote in message ... Hi there, Could anybody please help me with a formula i am trying to enter into my excel spreadsheet. i have two sets of variables "a" and "b" which are related to each other. Using a seperate formula I obtain "c" What i would like to do is apply 1 of 4 equations to "c" depending on the value of "a" and "b". if "a"0 and "b"0 then "c" stays as it is "a"<0 and "b"0 then minus"c" from 360 "a"0 and "b"<0 then minus"c" from 180 "a"<0 and "b"<0 then "c" plus 180 Is it at all possible to formulate the above?? Thanks for any help Mark |
#5
|
|||
|
|||
First, what happens if "a"=0 or "b" = 0 ????
One way: =IF(OR(a=0,b=0),"????",IF(a0,IF(b0,c,180-c),IF(b0,360-c,c+180))) In article , "mark.ew" wrote: Hi there, Could anybody please help me with a formula i am trying to enter into my excel spreadsheet. i have two sets of variables "a" and "b" which are related to each other. Using a seperate formula I obtain "c" What i would like to do is apply 1 of 4 equations to "c" depending on the value of "a" and "b". if "a"0 and "b"0 then "c" stays as it is "a"<0 and "b"0 then minus"c" from 360 "a"0 and "b"<0 then minus"c" from 180 "a"<0 and "b"<0 then "c" plus 180 Is it at all possible to formulate the above?? Thanks for any help Mark |
#6
|
|||
|
|||
Just another option:
=CHOOSE(2*(a0)+(b0)+1,c+180,360-c,180-c,c) However, if a,b, & c are angles, then there may be a more simplified solution. -- Dana DeLouis Win XP & Office 2003 "mark.ew" wrote in message ... Hi there, Could anybody please help me with a formula i am trying to enter into my excel spreadsheet. i have two sets of variables "a" and "b" which are related to each other. Using a seperate formula I obtain "c" What i would like to do is apply 1 of 4 equations to "c" depending on the value of "a" and "b". if "a"0 and "b"0 then "c" stays as it is "a"<0 and "b"0 then minus"c" from 360 "a"0 and "b"<0 then minus"c" from 180 "a"<0 and "b"<0 then "c" plus 180 Is it at all possible to formulate the above?? Thanks for any help Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I isolate my Excel server (automation) from other Excel instances? | Excel Discussion (Misc queries) | |||
VB Automation is Whacking out my Excel Environment | Excel Discussion (Misc queries) | |||
Excel 2000 file when opened in Excel 2003 generates errors? | Excel Discussion (Misc queries) | |||
Macro in Excel 2002 to save a workbook to a FTP location | Excel Discussion (Misc queries) | |||
Excel aficionado wants to learn Access | Excel Discussion (Misc queries) |