Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Want only rows with populated data

Have a challenging project:
In A2, have a combobox with the ability for the user to select an item
in a dropdown.. Based on it's selection, it populates many other
columns of data throughout the worksheet.
In columns G,H,I,J, have some results for "Options", call them Option
1, 2 3, or 4 which get populated as well. but in some instances, the
result shown for an item returns a blank, as that column's "Option" is
not available for the item in that row. Is there a way which will
just show rows that contain option that it's present for that selected
row that has data returned in any of the 4 columns" This would leave
the blank rows (except for rows 1-3 which contain the input, and
descriptive data) off entirely if none of the 4 options have retreived
any data. Would like to have this all as a result of the dropdown,
and stay away from an manual autofilter. Have room for a helper
column.
TIA for any ideas.
Pete
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Want only rows with populated data

Found this in one of the forums. Does the trick.
Pete
'
Sub HideRows()
Application.ScreenUpdating = False
Dim i As Integer
Dim RStart As Range
Dim REnd As Range
Set RStart = Range("G3")
Set REnd = Sheets("Presentation").Range("g65536").End(xlUp).O ffset(0,
3)
Range(RStart, REnd).Select
On Error Resume Next
With Selection
..EntireRow.Hidden = False
For i = 1 To .Rows.Count
If WorksheetFunction.CountBlank(.Rows(i)) = 4 Then
..Rows(i).EntireRow.Hidden = True
End If
Next i
End With
Set RStart = Nothing
Set REnd = Nothing
Range("A1").Select
Application.ScreenUpdating = True
End Sub
Reply
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
VBA to merge worksheets (only populated rows) akscooby Excel Discussion (Misc queries) 4 November 19th 09 11:19 AM
Need help linking spreadsheets and displaying only populated rows demarchi Excel Discussion (Misc queries) 1 November 26th 08 11:19 PM
how can i show/print just populated rows from a list PomgolianJen Excel Discussion (Misc queries) 0 September 10th 08 03:31 AM
Automatically gray out rows when a particular field is populated Bob Luck Excel Discussion (Misc queries) 4 August 30th 08 05:24 PM
how to count populated rows? Ryan Cain New Users to Excel 4 August 12th 05 04:35 AM


All times are GMT +1. The time now is 01:06 PM.

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

About Us

"It's about Microsoft Excel"