Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA to merge worksheets (only populated rows) | Excel Discussion (Misc queries) | |||
Need help linking spreadsheets and displaying only populated rows | Excel Discussion (Misc queries) | |||
how can i show/print just populated rows from a list | Excel Discussion (Misc queries) | |||
Automatically gray out rows when a particular field is populated | Excel Discussion (Misc queries) | |||
how to count populated rows? | New Users to Excel |