Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ...
I'm trying to write a formula in excel first column has some data with fixed $ values and all other values are -20. second and third coulumns have $ values. if column one contains fixed value other than -20 this supercedes col 2 and 3 always. if column 3 less than column 2 and column one not fixed (=-20) then column 3, else column 2. ex: col 1 col 2 col 3 10 (F) 10 8 -20 10 -20 15 12 So I want a column 4 to choose column 1 as answer where col 1 contains fixed value. if not then choose lesser of 2 and 3 or two in the case where 2 is the only col w a value. Please help!!!! Thanks in advance. -- Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put this in D2 (assuming A1 is the header for column1 and A2 the start of
your data) =if(A2=-20,min(B2,C2),A2) "learningaccess" wrote: Hi ... I'm trying to write a formula in excel first column has some data with fixed $ values and all other values are -20. second and third coulumns have $ values. if column one contains fixed value other than -20 this supercedes col 2 and 3 always. if column 3 less than column 2 and column one not fixed (=-20) then column 3, else column 2. ex: col 1 col 2 col 3 10 (F) 10 8 -20 10 -20 15 12 So I want a column 4 to choose column 1 as answer where col 1 contains fixed value. if not then choose lesser of 2 and 3 or two in the case where 2 is the only col w a value. Please help!!!! Thanks in advance. -- Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 7 May, 16:42, learningaccess
wrote: Hi ... I'm trying to write a formula in excel first column has some data with fixed $ values and all other values are -20. second and third coulumns have $ values. if column one contains fixed value other than -20 this supercedes col 2 and 3 always. if column 3 less than column 2 and column one not fixed (=-20) then column 3, else column 2. ex: col 1 col 2 col 3 10 (F) 10 8 -20 10 -20 15 12 So I want a column 4 to choose column 1 as answer where col 1 contains fixed value. if not then choose lesser of 2 and 3 or two in the case where 2 is the only col w a value. Please help!!!! Thanks in advance. -- Thanks! Assuming 'col 1' is in cell A1 .... In cell "D2" .... =IF(A2<-20,A2,IF(C2="",B2,IF(C2<B2,C2,B2))) Try that out and see if it gives the desired results .... Rob |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rob,
The only time excel will treat empty cells as "0" in a min or max formual is when all the cells you're taking a max or min over are empty... I'm not trying to be petty by correcting you, it's just worth knowing, especially you're pushing the limit on the number of If() statements! Sam " wrote: On 7 May, 16:42, learningaccess wrote: Hi ... I'm trying to write a formula in excel first column has some data with fixed $ values and all other values are -20. second and third coulumns have $ values. if column one contains fixed value other than -20 this supercedes col 2 and 3 always. if column 3 less than column 2 and column one not fixed (=-20) then column 3, else column 2. ex: col 1 col 2 col 3 10 (F) 10 8 -20 10 -20 15 12 So I want a column 4 to choose column 1 as answer where col 1 contains fixed value. if not then choose lesser of 2 and 3 or two in the case where 2 is the only col w a value. Please help!!!! Thanks in advance. -- Thanks! Assuming 'col 1' is in cell A1 .... In cell "D2" .... =IF(A2<-20,A2,IF(C2="",B2,IF(C2<B2,C2,B2))) Try that out and see if it gives the desired results .... Rob |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you! You really simplified things!
-- Thanks! "Sam Wilson" wrote: Put this in D2 (assuming A1 is the header for column1 and A2 the start of your data) =if(A2=-20,min(B2,C2),A2) "learningaccess" wrote: Hi ... I'm trying to write a formula in excel first column has some data with fixed $ values and all other values are -20. second and third coulumns have $ values. if column one contains fixed value other than -20 this supercedes col 2 and 3 always. if column 3 less than column 2 and column one not fixed (=-20) then column 3, else column 2. ex: col 1 col 2 col 3 10 (F) 10 8 -20 10 -20 15 12 So I want a column 4 to choose column 1 as answer where col 1 contains fixed value. if not then choose lesser of 2 and 3 or two in the case where 2 is the only col w a value. Please help!!!! Thanks in advance. -- Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula | Excel Worksheet Functions | |||
Build excel formula using field values as text in the formula | Excel Worksheet Functions | |||
Formula expected end of statement error, typing formula into cell as part of VBA macro | Excel Programming | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |