Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:22:00+00:00 2026-05-30T11:22:00+00:00

I have a sheet with user details in columns A – C. Columns D-H

  • 0

I have a sheet with user details in columns A – C.
Columns D-H is distribution lists the users are subscribed too. (currently check box linked to cell to indicate which list(s) user is subscribed to)

A user can be subscribed to more than on list.

At the moment I can use filters which works ok to filter users for list x, copy the user info to another sheet, then next list filterd (used text for the list selection)
This does cause some problems between some of the users of this sheet.(those that don’t know how to use filters)

I would like to create a new sheet for each list which gets populated automatically.
As a user is added/removed from a list, his details is automatically added/removed from the corresponding ‘list sheet’.

This way no one can complain about the filters
At the same time they can then export the ‘list sheet’ they require to another xls doc or csv as required.

I have found various options on how to do this, but all of then had only one selection column. I thought I could alter some of the ranges etc etc in the sample code but all failed with the limited knowledge I have with VB.

Any suggestions on how to do this?
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:22:01+00:00Added an answer on May 30, 2026 at 11:22 am

    Please do not try and create two copies of your data. Keeping two versions of the same data in step is very, very difficult.

    I believe your best option is to create a macro with which your users can select the filter they require.

    You do not describe your data in much detail so I have imagined something like the following:

    Name    Addr        Tele   List1    List2   List3   List4   List5
    John    London      1234   x                
    Jane    Paris       2345            x           
    Kevin   Stockholm   3456                    x       
    Mary    Brussels    4567                            x   
    Nigel   Dublin      5678                                    x
    Abby    Athens      6789   x        x               x
    Brian   Rome        7890                    x           
    

    Given the above layout, the following macro shows the sort of thing I would offer.

    When the macro is executed, it displays an InputBox like this:

    enter image description here

    from which the user can select the filter required.

    I hope this gives you some ideas.

    Option Explicit
    Sub SelectFilter()
    
      Dim ColNum() As Variant
      Dim InxList As Long
      Dim ListName() As Variant
      Dim Prompt As String
      Dim ReturnValue As Variant
    
      ' Load ListName with user-friendly names for the lists
      ListName = Array("Name list 1", "Name list 2", "Name list 3", _
                       "Name list 4", "Name list 5")
      ' Load ColNum with the column number for each list.  The entries in ColNum
      ' must be in the same sequence as the entries in ListName.  Column "A" is
      ' column 1, column "B" is column 2 and so on.
      ColNum = Array(4, 5, 6, 7, 8)
    
      ' Combine the user-friendly list names to create a menu
      Prompt = ""
      For InxList = 0 To UBound(ListName)
        Prompt = Prompt & InxList + 1 & ". " & ListName(InxList) & vbLf
      Next
      Prompt = Prompt & "Please enter the number against the list you require." _
               & vbLf & "Leave box empty to cancel selection."
    
      ' Loop until user cancels or enters a permitted value
      Do While True
        ReturnValue = InputBox(Prompt, "Select filter")
        If VarType(ReturnValue) = vbBoolean Then
          If Not ReturnValue Then
            ' The documentation for InputBox claims it returns False if
            ' the user clicks Cancel.  In my experience it return a
            ' null string but check to be on the safe side.
            Exit Sub
          Else
            ' True is not a documented return value from InputBox.
            ' This code should never be executed but if something
            ' goes wrong there is a message for the user.
            Call MsgBox("Please report there has been a InputBox " & _
                        "error type 1 to Chaka", vbCritical)
            Exit Sub
          End If
        End If
        If VarType(ReturnValue) <> vbString Then
          ' False or a string are the only documented return values
            ' This code should never be executed but if something
            ' goes wrong there is a message for the user.
           Call MsgBox("Please report there has been a InputBox " & _
                        "error type 2 to Chaka", vbCritical)
           Exit Sub
        End If
        If ReturnValue = "" Then
          ' User has clicked cancel or left the text box empty.
          Exit Sub
        End If
        If IsNumeric(ReturnValue) Then
          InxList = ReturnValue - 1
          If InxList >= 0 And InxList <= UBound(ListName) Then
            ' Good selection
            Exit Do
          End If
        End If
      Loop
    
      With Sheets("Sheet2")
        If .AutoFilterMode Then
          ' AutoFilter is on.  Cancel current selection before applying
          ' new one because criteria are additive.
          .AutoFilterMode = False
        End If
    
        .Cells.AutoFilter Field:=ColNum(InxList), Criteria1:="x"
      End With
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let say I have a sheet in with columns Customer and CreatedDate with lots
I have a Excel sheet with two columns and I need to create new
I have an Excel workbook with a number of features: One main user-facing sheet
I have a sheet with a custom button on it from where I control
I have a sheet full of some raw data, about 20,000 rows and 50
I have style sheet with a class name changebackgroundcolor i want make change in
Here's what I have: Quarter Sheet Flyer (4 per page) as a PSD or
I have an xslt sheet with some text similar to below: <xsl:text>I am some
I have an excel sheet full of times. They are formatted so that they
I have created Excel Sheet using Java program. It works fine. My problem is,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.