Multiple if/or statements

loggiaaj

Board Regular
Joined
May 8, 2006
Messages
66
So, I need a statement that will re-create a table to be graphed; but with only values that are not zero in TOT. CUM. column j
So the first record in this sample should start with a4=660


a b c d e f g h i j (TOT CUM.)
1 600 0 0 0 0 0 0 0 0 0
2 606 0 0 0 0 0 0 0 0 0
3 610 0 0 0 0 0 0 0 0 0
4 660 24 25 35 45 56 63 76 80 80
5 670 21 21 31 39 50 55 66 69 69
6 690 21 21 28 33 43 56 68 72 72

So, this is what the new table should look like:

660 - with values above
670 " "
690 " "
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Excel 2010[TABLE="class: grid, width: 500"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/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]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: right"]606[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: right"]610[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]76[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]80[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: right"]670[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]39[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]66[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]69[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]960[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]68[/TD]
[TD="align: right"]72[/TD]
[TD="align: right"]72[/TD]
[/TR]
[TR]
[TD="align: center"]7[/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]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]new table[/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]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]76[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]80[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]670[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]39[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]66[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]69[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]960[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]68[/TD]
[TD="align: right"]72[/TD]
[TD="align: right"]72[/TD]
[/TR]
</tbody>[/TABLE]
Sheet4

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array 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: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A9[/TH]
[TD="align: left"]{=IF(ROWS($A$9:A9)>COUNTIF($J$1:$J$6,">0"),"",INDEX(A$1:A$6,SMALL(IF($J$1:$J$6>0,ROW($J$1:$J$6)-ROW($J$1)+1),ROWS($A$9:A9))))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
Copy the formula down and across.
 
Upvote 0
Why not just Advanced Filters and Filter on the Tot Cum column, and filter to a new location?
 
Upvote 0
How did it not work? Did you use CONTROL+SHIFT+ENTER?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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