Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
hi,
I have four five each contain number 5, 2, 3, 4, 6 in cell A1 to E1. Now in a new cell let's say B1 i need to select the minum positive value from below formula formula 1 A1-B1 = 3 formula 1 A1-C1 = 2 formula 1 A1-D1 = 1 formula 1 A1-E1 = -1 How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. -- Sincerely Yours Haviv |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
I have four five each contain number 5, 2, 3, 4, 6 in cell A1 to E1.
Now in a new cell let's say B1 i need to select the minum positive value from below formula formula 1 A1-B1 = 3 formula 1 A1-C1 = 2 formula 1 A1-D1 = 1 formula 1 A1-E1 = -1 How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. Probably not the most compact formula, but it does seem to do what you asked... =MIN(IF(A1-B1<=0,1E+300,A1-B1),IF(A1-C1<=0,1E+300,A1-C1),IF(A1-D1<=0,1E+300,A1-D1),IF(A1-E1<=0,1E+300,A1-E1)) Rick |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
=MIN(IF($A$1-$B1:$E10,$A$1-$B1:$E1))
Entered with Ctrl+Shift+Enter You will get {} round the formula if entered correctly "haviv" wrote: hi, I have four five each contain number 5, 2, 3, 4, 6 in cell A1 to E1. Now in a new cell let's say B1 i need to select the minum positive value from below formula formula 1 A1-B1 = 3 formula 1 A1-C1 = 2 formula 1 A1-D1 = 1 formula 1 A1-E1 = -1 How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. -- Sincerely Yours Haviv |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
"haviv" wrote...
I have four five each contain number 5, 2, 3, 4, 6 in cell A1 to E1. Now in a new cell let's say B1 i need to select the minum positive value from below formula formula 1 A1-B1 = 3 formula 1 A1-C1 = 2 formula 1 A1-D1 = 1 formula 1 A1-E1 = -1 How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. =A1-MAX(B1:E1) |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
"Harlan Grove" wrote...
"haviv" wrote... .... How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. =A1-MAX(B1:E1) Sorry, didn't read carefully enough. Either the regular formula =A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1)) or the array formula =A1-MAX(IF(B1:E1<A1,B1:E1)) |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
Did you test this ...
=A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1)) ???? Answer is -1 which not what OP wanted. It also fails on this sequence of numbers: 5 2 3 4 4 or any sequence where B1 :E1 is not A1 "Harlan Grove" wrote: "Harlan Grove" wrote... "haviv" wrote... .... How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. =A1-MAX(B1:E1) Sorry, didn't read carefully enough. Either the regular formula =A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1)) or the array formula =A1-MAX(IF(B1:E1<A1,B1:E1)) |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
.. or to be correct
if B1:E1 < A1 "Toppers" wrote: Did you test this ... =A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1)) ???? Answer is -1 which not what OP wanted. It also fails on this sequence of numbers: 5 2 3 4 4 or any sequence where B1 :E1 is not A1 "Harlan Grove" wrote: "Harlan Grove" wrote... "haviv" wrote... .... How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. =A1-MAX(B1:E1) Sorry, didn't read carefully enough. Either the regular formula =A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1)) or the array formula =A1-MAX(IF(B1:E1<A1,B1:E1)) |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
"Toppers" wrote...
Did you test this ... =A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1)) ???? .... Nope. Off by one. It should be =A1-LARGE(B1:E1,COUNTIF(A1:E1,"="&A1)) |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding minum positive from the result of formula
Thanks,
Rick anwers is the most suitable one while sorry topper yours is not working -- Sincerely Yours Haviv "Rick Rothstein (MVP - VB)" wrote: I have four five each contain number 5, 2, 3, 4, 6 in cell A1 to E1. Now in a new cell let's say B1 i need to select the minum positive value from below formula formula 1 A1-B1 = 3 formula 1 A1-C1 = 2 formula 1 A1-D1 = 1 formula 1 A1-E1 = -1 How do i develop a formula to be able to show the value of (A1-D1) which is the minimum positive value. Probably not the most compact formula, but it does seem to do what you asked... =MIN(IF(A1-B1<=0,1E+300,A1-B1),IF(A1-C1<=0,1E+300,A1-C1),IF(A1-D1<=0,1E+300,A1-D1),IF(A1-E1<=0,1E+300,A1-E1)) Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
finding maximum, minimum in a range consists both Positive and Negative numbers | Excel Worksheet Functions | |||
Finding non contiguous positive values | Excel Worksheet Functions | |||
How can I add a + sign to a positive result of a calculation? | Excel Discussion (Misc queries) | |||
Cell formula where result to be Positive only | Excel Discussion (Misc queries) | |||
Finding negative and positive diffrence | Excel Worksheet Functions |