LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default HIDE ROWS IF..

Thanks very much once more, Norman.
regards,
TiDz

"Norman Jones" rašė:

Hi TiDz,

I received your sample workbook.

Try:

'=============
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngIn As Range
Dim rngOut As Range
Dim iMax As Long

Set rngIn = Me.Range("A1:C1")
Set rngOut = Me.Range("A3")

iMax = Application.Max(rngIn)

If Not Intersect(rngIn, Target) Is Nothing Then
On Error GoTo XIT
Application.EnableEvents = False
Range(rngOut, rngOut.End(xlDown)).ClearContents
Set rngOut = rngOut.Resize(iMax + 1)
rngOut(1) = 0
rngOut.DataSeries Rowcol:=xlColumns, Type:=xlLinear, _
Step:=1, Trend:=False
End If

XIT:
Application.EnableEvents = True

End Sub
'<<=============

This is worksheet event code and should be pasted into the worksheets's code
module (not a standard module and not the workbook's ThisWorkbook module):

Right-click the worksheet's tab
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi TiDz,

If you wish, you may send me a sample workbook.In one sheet, show your
intial data; in another sheet, show the desired results.

norman_jones@NOSPAMbtconnectDOTcom

(Delete "NOSPAM" and replace "DOT" with a full stop [period] )

---
Regards,
Norman




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Group rows (or hide rows) like in MS Project Annie1904 Excel Worksheet Functions 2 October 17th 09 05:15 AM
Macro code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
cut rows without cutting hide rows מיכל Excel Discussion (Misc queries) 1 June 25th 07 02:01 PM
Hide Rows - copy and paste only rows that show Access101 Excel Worksheet Functions 3 March 1st 06 12:39 AM


All times are GMT +1. The time now is 01:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"