How to automatically hide row if Column B is blank OR contains a duplicate value as a previous cell

steve80s

New Member
Joined
Aug 18, 2022
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I've managed to create a list that will autofill from other sources using formulas such as =[Book2]Sheet1!$O$18

I need a Macro/Code/Whatever which will automatically hide rows where Column B is empty OR where there are duplicate values in Column B (such as if 'Mr A' appeared twice).

It needs to be working constantly in the background, as it's possible the original source (Sheet1) will be updated and Column B suddenly contains data, so that line would need to un-hide on my spreadsheet.

Please see screenshot to illustrate my layout.

Thanks in advance!
 

Attachments

  • Screenshot 2025-02-24 150956.png
    Screenshot 2025-02-24 150956.png
    49.1 KB · Views: 3

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