![]() |
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 |
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 |
All times are GMT +1. The time now is 07:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com