Hidding Rows

AlexMach

New Member
Joined
Apr 6, 2009
Messages
17
Hi there,

I am currently using the following macro

Public Sub HideRows()
Dim N
Application.ScreenUpdating = False
For N = 4 To 358
If Range("AF" & N).Value = "0" Then
Rows(N).EntireRow.Hidden = True
Else
Rows(N).EntireRow.Hidden = False
End If
Next N
Application.ScreenUpdating = True
End Sub

However this seems to slow/freeze my screen and excel is there a simplfied version of this macro that can hide rows within a data set that i do not wish to see?

Backgroung to this... I have a template that imports a data extract in its orginal form. I only want to see a specific set of data therefore i have put a if formula in Column AF4:AF258 that will give me either 1 or 0 back. 0 for when the date does not meet the criteria and thus would like to hide this row.

The issue is that this macro seems to freeze my workbook and it gets stuck on calculate cell 100% but nothing happens.

I would really appreciate some input here.

thank you in advance
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
sorry for interrupting.. im sorry im a newbie here.. how can i post and i cant even find the discussion board.. anyway, here's my prob and im wondering how cud i pre input two characters in default without typing it. im encoding code having the same first two letters as "BH" because we are using those codes. e.g. BHUN BHGY BHFD BHAA BHEE BHFD some what like that. im thinking it wud be more easy if i'l type letters UN only instead of BHUN, GY instead of BHGY and so on..

hope u can help me with this one. im from the philippines.:biggrin:
 
Upvote 0
sorry for interrupting..
im sorry im a newbie here..
how can i post and i cant even find the discussion board..

anyway, here's my prob and im wondering how cud i pre input two characters in default without typing it. im encoding code having the same first two letters as "BH" because we are using those codes. e.g. BHUN BHGY BHFD BHAA BHEE BHFD some what like that. im thinking it wud be more easy if i'l type letters UN only instead of BHUN, GY instead of BHGY and so on..

hope u can help me with this one. im from the philippines.:biggrin:
 
Upvote 0
mr.bonligur,

Just for you!

What you want can be done using Auto correction.

Go to excel options, proofing, in the box that appears click auto correct options, in the replace box, in lower case type un then in the with box, in upper case type in BHUN then click add. Repeat with the rest of your codes then next time you type un in either upper or lower case BHUN will appear when you press enter.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,337
Members
452,907
Latest member
Roland Deschain

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