How to display a certain number of rows based off of a cell value...

chindel

New Member
Joined
Nov 6, 2013
Messages
8
If I want to display row values 1-30 when the cell value is 30 or 1-10 when the value is 10, what function do I use for that? Thanks in advance.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Welcome to the Board!

This will require VBA.
Where does this Cell with this number reside?
Are all the rows hidden or unhidden by default (so is our VBA hiding or unhiding rows)?
 
Upvote 0


application.pdf


Not sure if this image works, but I'm trying to display only the information on the table that is at or below the number of years entered.

I am unfamiliar with VBA, does that mean turning on Macros and writing formulas?

Thanks for the welcome!
 
Upvote 0
If you just want to hide the data (as opposed to hiding the ROWS), you might be able to use conditional formatting. For example:


Excel 2010
ABCDE
1DateSalesRows to Display10
21/3/201320521
31/7/20136463
42/22/201316652
53/11/201321588
63/13/20139201
73/15/20137457
83/21/201315166
95/5/201321740
105/9/20139176
Sheet75



Excel 2010
ABCDE
1DateSalesRows to Display30
21/3/201320521
31/7/20136463
42/22/201316652
53/11/201321588
63/13/20139201
73/15/20137457
83/21/201315166
95/5/201321740
105/9/20139176
115/13/20137171
125/26/201320230
136/2/20139461
146/2/201310196
156/4/201315352
166/12/201324278
176/12/20139973
186/14/201311304
197/7/20135900
207/8/20136104
217/8/201319098
227/21/20136676
238/10/201310070
248/18/201321689
258/28/20139536
269/4/201313254
279/25/20139163
289/28/201323310
299/30/20137033
3010/7/201318173
Sheet75


Instructions:
1) Highlight all cells by using the keyboard shortcut Ctrl+A.
2) Go to Conditional Formatting --> New Rule --> Use Formula
3) Enter this formula: =ROW(A1)>$E$1
4) Select Format --> Go to Number tab --> Custom
5) In the type box, delete the contents (such as General), and type ;;;
6) Click Ok, and Ok.
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,289
Members
449,149
Latest member
mwdbActuary

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