View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Scott Scott is offline
external usenet poster
 
Posts: 87
Default Simpler Formula ... 2nd lowest value?

Alternatively:

=H12*IF(MAX(C12:G12)=MIN(C12:G12),C12,SMALL(C12:G1 2,COUNTIF(C12:G12,MIN(C12:G12))+1))

Scott

driller wrote:
Hi kha

considering that any of your data will fit to your posted formula

=IF(MIN(C12:G12)=MAX(C12:G12),MAX(C12:G12)*H12,IF( SMALL(C12:G12,2)MIN(C12:G12),SMALL(C12:G12,2)*H12 ,IF(SMALL(C12:G12,3)MIN(C12:G12),SMALL(C12:G12,3) *H12,IF(SMALL(C12:G12,4)MIN(C12:G12),SMALL(C12:G1 2,4)*H12,(MAX(C12:G12)*H12)))))

i try this a few times, whew, i am very very confused!

=H12*IF(MIN(C12:G12)=MAX(C12:G12),MAX(C12:G12),IF( COUNTIF(C12:G12,MIN(C12:G12))1,SMALL(C12:G12,(1+C OUNTIF(C12:G12,MIN(C12:G12)))),SMALL(C12:G12,2)))

happy holidays

"Ken" wrote:

Excel2003 ... I have from 1-5 random numbers (format 2 decimal places). In a
separate column (Col I) I wish to always have the 2 lowest value from the
random numbers ... The following formula achieves this for me, but I am
thinking there might be a simpler way of writing??? One clarifier ... In the
following Formula Col H contains a Qty which I wish to multiply the 2nd
lowest value in Range C12:G12 by.

=IF(MIN(C12:G12)=MAX(C12:G12),MAX(C12:G12)*H12,IF( SMALL(C12:G12,2)MIN(C12:G12),SMALL(C12:G12,2)*H12 ,IF(SMALL(C12:G12,3)MIN(C12:G12),SMALL(C12:G12,3) *H12,IF(SMALL(C12:G12,4)MIN(C12:G12),SMALL(C12:G1 2,4)*H12,(MAX(C12:G12)*H12)))))

Thanks ... Kha