formula correction

LuGyver

Board Regular
Joined
Mar 13, 2014
Messages
88
Office Version
  1. 2007
Platform
  1. Windows
This works great until A1:A3 has a zero involved, then it returns all zero's. Pretty sure it has to do with *(multiplication) but would like to stay with sumproduct if possible.

1] A5 =SMALL(A1:F3,1)

2] In B5, formula copied across right until blank :

=IFERROR(SMALL($A$1:$F$3,SUMPRODUCT(($A$1:$F$3>0)*($A$1:$F$3<=A5))+1),"")

[TABLE="class: cms_table"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] "]
[TD][/TD]
[TD]A
[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]48[/TD]
[TD="align: right"]58[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]50[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2
[/TD]
[TD="align: right"]85
[/TD]
[TD="align: right"]05
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3
[/TD]
[TD="align: right"]85[/TD]
[TD="align: right"]05
[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]65[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]95[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5
[/TD]
[TD]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD="align: right"]00
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6
[/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Much appreciated
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi

Are you trying to pull a list of unique values from A1:F3?

In B5 try =IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>A5), 1), "")
 
Upvote 0
Hi

Are you trying to pull a list of unique values from A1:F3?

In B5 try =IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>A5), 1), "")

Actually want to bring three rows containing data into one row Row 5 and then duplicates are removed.
 
Upvote 0
OK, the formula I provided will remove the duplicates, but if you want all the values in one row (including duplicates) then use this in A5

=IFERROR(SMALL($A$1:$F$3, COLUMNS($A$1:A1)), "")

Then drag across.
 
Upvote 0
OK, the formula I provided will remove the duplicates, but if you want all the values in one row (including duplicates) then use this in A5

=IFERROR(SMALL($A$1:$F$3, COLUMNS($A$1:A1)), "")

Then drag across.

The first formula didn't return anything. However the 2nd did fine with duplicates. I can work with that, but if you see a way to overcome the duplicates... even better
Thank you mrhstn
 
Upvote 0

Book1
ABCDEFGHIJK
128485820050
2855
385515657595
4
505152028485058657585
Sheet1
Cell Formulas
RangeFormula
A5=SMALL(A1:F3, 1)
B5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>A5), 1), "")
C5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>B5), 1), "")
D5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>C5), 1), "")
E5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>D5), 1), "")
F5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>E5), 1), "")
G5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>F5), 1), "")
H5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>G5), 1), "")
I5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>H5), 1), "")
J5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>I5), 1), "")
K5=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>J5), 1), "")
 
Upvote 0
ABCDEFGHIJK

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]48[/TD]
[TD="align: right"]58[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]85[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]85[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]65[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]95[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]48[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]58[/TD]
[TD="align: right"]65[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]85[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A5[/TH]
[TD="align: left"]=SMALL(A1:F3, 1)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>A5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>B5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>C5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>D5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>E5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]G5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>F5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]H5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>G5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>H5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]J5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>I5), 1), "")[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]K5[/TH]
[TD="align: left"]=IFERROR(AGGREGATE(15, 6, $A$1:$F$3/($A$1:$F$3>J5), 1), "")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Using Excel 2007...?
still nothing B5 auto fill across to K5. format is number with zero decimal places. Looks like this is working on your side.
 
Upvote 0
Excel 2007 doesn't have AGGREGATE, so... in place of the AGGREGATE, but retaining the first SMALL try this


This needs to be entered using CTRL+SHIFT+ENTER, not just enter.

=IFERROR(SMALL(IF($A$1:$F$3>A5, $A$1:$F$3), 1), "")

Put it in B5 and copy across.
 
Upvote 0

Book1
ABCDEFGHIJKL
128485820050
2855
385515657595
4
50515202848505865758595
Sheet1
Cell Formulas
RangeFormula
A5=SMALL(A1:F3, 1)
B5{=IFERROR(SMALL(IF($A$1:$F$3>A5, $A$1:$F$3), 1), "")}
C5{=IFERROR(SMALL(IF($A$1:$F$3>B5, $A$1:$F$3), 1), "")}
D5{=IFERROR(SMALL(IF($A$1:$F$3>C5, $A$1:$F$3), 1), "")}
E5{=IFERROR(SMALL(IF($A$1:$F$3>D5, $A$1:$F$3), 1), "")}
F5{=IFERROR(SMALL(IF($A$1:$F$3>E5, $A$1:$F$3), 1), "")}
G5{=IFERROR(SMALL(IF($A$1:$F$3>F5, $A$1:$F$3), 1), "")}
H5{=IFERROR(SMALL(IF($A$1:$F$3>G5, $A$1:$F$3), 1), "")}
I5{=IFERROR(SMALL(IF($A$1:$F$3>H5, $A$1:$F$3), 1), "")}
J5{=IFERROR(SMALL(IF($A$1:$F$3>I5, $A$1:$F$3), 1), "")}
K5{=IFERROR(SMALL(IF($A$1:$F$3>J5, $A$1:$F$3), 1), "")}
L5{=IFERROR(SMALL(IF($A$1:$F$3>K5, $A$1:$F$3), 1), "")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Excel 2007 doesn't have AGGREGATE, so... in place of the AGGREGATE, but retaining the first SMALL try this


This needs to be entered using CTRL+SHIFT+ENTER, not just enter.

=IFERROR(SMALL(IF($A$1:$F$3>A5, $A$1:$F$3), 1), "")

Put it in B5 and copy across.

Bingo! Thank you mrhstn, I appreciate you
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top