logo
down
shadow

Efficiently hiding / unhiding many (+500) rows in Excel VBA


Efficiently hiding / unhiding many (+500) rows in Excel VBA

Content Index :

Efficiently hiding / unhiding many (+500) rows in Excel VBA
Tag : excel , By : user179938
Date : November 24 2020, 05:47 AM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

VBA: Excel loop - hiding/unhiding sheets


Tag : excel , By : rajiv
Date : March 29 2020, 07:55 AM
I hope this helps .
Sub Hideall_butlast_10()
    Dim ws As Worksheet

    For Each ws In ActiveWorkbook.Worksheets
        ws.Visible = xlSheetVisible
    Next ws

    Const lowerBound As Integer = 5
    Const upperBound As Integer = 10

    Dim i, x
    i = Worksheets.Count
    If (i > lowerBound + upperBound) Then
        For x = lowerBound + 1 To (i - upperBound)
            Sheets(x).Visible = xlSheetHidden
        Next x
    End If
End Sub 

Excel VBA for Unhiding or Hiding a Worksheet Conditionally Based on Cell Value


Tag : excel , By : fayoh
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , You haven't mentioned what sheet Range("G39") is on
If it's on Sheet1 try comparing lower case strings:
Sheets("Prop. Pres. Notes 206-261").Visible = LCase(Sheets(1).Range("G39").Value2) = "yes"

Hiding and unhiding rows


Tag : excel , By : apple
Date : March 29 2020, 07:55 AM
With these it helps It seems instead of counter2 = (counter2 + 1) Mod 5, you want to do counter2 = (counter2 Mod 4) + 1
If you define a number modulo 5, it is expected it will generate 5 steps.

Speed up Hiding/Unhiding rows based on criteria


Tag : excel , By : user134570
Date : March 29 2020, 07:55 AM

cell value to change when hiding/unhiding specific rows in excel?


Tag : excel , By : lili
Date : March 29 2020, 07:55 AM
this will help Hello and welcome to Stack Overflow!
In general, you should always provide some proof (code) of your previous attempts, not only it helps us to understand better what you're trying to achieve, but also because of core principle behind this website is to help people with their code, not to do the coding for them!
Private Sub check_hidden_area()
  If Rows("1:17").EntireRow.Hidden = True Then
    Range("B18") = True
  Else
    Range("B18") = False
  End If 
End Sub
Private Sub check_hidden_area()
Range("B18") = False
  For i = 1 To 17
     If Rows(i).EntireRow.Hidden = True Then
       Range("B18") = True
       Exit For
     End If
  Next i
End Sub
Private Sub Worksheet_Change (ByVal Target as Range)
   '...
   Call check_hidden_area
End Sub
Private Sub CommandButton1_Click 
   Call check_hidden_area
End Sub
Related Posts Related QUESTIONS :
  • How to use vlookup in vba-excel?
  • VBA using Excel version of Find on a Word Object?
  • How to delete Excel rows containing cells with less than specific amount of characters in them?
  • How to load a PQ function from a text file
  • Fill many cells in a row with one value
  • What would be the correct way to convert a column's text into multiple columns?
  • Use a Dynamic Range in an Excel Formula
  • Finding Max/Min Without Using Array
  • autofilter erroring out
  • Fixing "Unknown runtime error" code 800A03EC in VBScript to run macro without opening Excel
  • How to access the value of a string when defining within a loop
  • How to keep formulas working when copy and pasting in Excel?
  • How to calculate the difference between max/min dates on non static pivot tables?
  • How to store row and column of excel into array (more than 1 column and 1 row)
  • Can having multiple instances of Excel open cause VBA issues?
  • Why vba is replacing SN-Sh as zeros in the Word Snapshot as 00ap00ot?
  • Excel formula to return value of cell in column A based off the relative cell value in column B
  • how to remove negative sign from a characters or text?
  • How to get the border sizes of a userform?
  • Allow two cells to depend on each other
  • Excel count rows while treating merged rows as one
  • Search for a text segment using MAX IF in Excel
  • Unable to set object VBA
  • How can I transfer to a sheet if range says "Fail" in any cell?
  • Shorten a cell, nested Ifs Excel
  • Finding the volume of a tank in VBA given the radius, height, and depth
  • Compile Error on simple VBA form and command button click code
  • Looping through Workbooks and Copy a Dynamic range to Master Workbook
  • Using .NET HashTable Return Type in VBA
  • How do I not get Run-time error '13': Type mismatch while iterating rows?
  • How to change image of a Powerpoint shape?
  • Adding character before text in Excel without using formula
  • How can I create a list of numbers that is like the following?
  • How to fix " Run-time error '380' in Excel VBA?
  • How can you repeat a number x times in a column in a continuation, in excel
  • How to delete the content of a txt file with vba?
  • How to work with more Target.Address (range)
  • Change arrow color based on its label or value
  • how to get inner text of html under id?
  • Getting "Argument not optional" error on segment of code
  • can't add 1 to current cell value
  • Role/permission analysis in Excel: comparing list of user permissions with pairs of disallowed roles
  • Excel Range.PivotField equivalent for JavaScript API
  • How to fix 1004 error with macros in Excel VBA?
  • How to copy rows between worksheets based on a text value
  • Even though method exist in sheet
  • How to delete a row if certain cells are blank in VBA
  • how to get address cell
  • Change Worksheet CodeName in protected VBProject
  • Column Offset Excel Formula
  • Convert UTC time stamp in text to Excel date
  • Formula where Number is constant
  • Excel VBA / Split String Into Columns based on Character Count
  • getElementById won't work in VBA, error 438
  • Writing to Excel file in specific format using Perl
  • Filter text out of barcode while scanning physical barcodes
  • Trouble getting custom function syntax right: Contains()
  • Import multiple csv files to specific sheets in a workbook
  • Range.Find Function
  • I need to assign time value to a variable
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com