Hide Rows based on cell content after unique records sort

RudeRam

Board Regular
Joined
Apr 2, 2004
Messages
73
I have worksheet were folks will paste info into column A and Vlookup returns results.
I have set a sort my unique records only, what I want to have happen if there is no data in column B 1 want that row to be hidden also.
Ideally I’d like to combine with what I have recorded for the sort:

Sub Sort()
'
' Sort Macro
'
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("A1:B92").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
End Sub

Thanks in advance for any help on this.

Rick

PS Apologies for all information the from the worksheet, figured better to include all then not enough



Excel 2010
AB
1Event CodeEvent Descp
251Online Username Change
372CGIAccountProfile
456#N/A
5113#N/A
6264#N/A
8265#N/A
971#N/A
11369cqPresentment
12132#N/A
13258#N/A
14331#N/A
1545#N/A
16306#N/A
1723#N/A
18521#N/A
19450#N/A
21483#N/A
22296#N/A
23537#N/A
24360cqRegisterIntro
25246#N/A
26386contactOCSDisplay
27134Consumer online banking activation by phone bank
28583#N/A
29543#N/A
30204#N/A
33476#N/A
34277#N/A
35387creditCardAuth
3690#N/A
37559OutOfWalletAuthen
38465#N/A
39425#N/A
40268#N/A
41468#N/A
Sheet1
Cell Formulas
RangeFormula
B2=VLOOKUP(A2,Risky_Events,4,0)
B8=VLOOKUP(A8,Risky_Events,4,0)
B11=VLOOKUP(A11,Risky_Events,4,0)
B21=VLOOKUP(A21,Risky_Events,4,0)
B33=VLOOKUP(A33,Risky_Events,4,0)
Named Ranges
NameRefers ToCells
Risky_Events=Sheet2!$B$2:$E$91
 
Last edited:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Assuming you mean that an error returned by your VLOOKUP is what you mean by a cell with no data:
Code:
Sub Sort()
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("A1:B92").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
On Error Resume Next
    Range("B2:B92").SpecialCells(xlCellTypeFormulas, xlErrors).EntireRow.Hidden = True
On Error GoTo 0
End Sub
 
Upvote 0
JoeMo,

Thank for the reply, yes that is what I mean, I have the #N/A "hidden" by formatting I honestly forgot they were there. Your edits worked perfectly.

Thank you again

Rick
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,004
Members
452,374
Latest member
keccles

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