+ Reply to Thread
Results 1 to 5 of 5

Unhide rows based on semi static, semi dynamic value

  1. #1
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Unhide rows based on semi static, semi dynamic value

    Hello again excel ninjas!

    I have this code

    Please Login or Register  to view this content.
    Which hides rows, based on phone call durations shorter than 600 seconds (a value stored in column N).

    Now I want to UNHIDE phone calls made to certain phone numbers, regardless of length. Specifically, any phone call starting with 13 I want to unhide, but sometimes they'll be 13#### and sometimes 13########. This information would be found in column K

    Basically what I'm struggling with is how to specify the dynamic criteria in VBA?

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Unhide rows based on semi static, semi dynamic value

    Hi, Christopher135,

    maybe unhide wth whoile range in advance and just hide those rows that do not match? Any reason for using On Error Resume Next in that procedure?

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: Unhide rows based on semi static, semi dynamic value

    Saving my bacon once more! you're a champion Hahobe!

    As for the on error line, it had previously been throwing out a weird error, when the code looked very different. I've changed the code since then and been lazy and left that in. Now the code runs perfectly, I'll get rid of it thanks for helping me keep my code clean!

  4. #4
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: Unhide rows based on semi static, semi dynamic value

    One final question:

    This runs on 305 unique worksheets. it takes *forever*. Anything I can do to speed it up? turn off screen updating? tilt the computer so the electricty can run down hill? sacrifice a goat? :P

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Unhide rows based on semi static, semi dynamic value

    Hi, Christopher135,

    Application.ScreenUpdating would be an alternative, putting the Application into the tray may be an alternative. Adding an additional column and a formula for using the Autofilter would be the best way to avoid a loop and work on all visible cells/rows at once.

    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel semi-rookie
    By MICKEYDAVIS in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 06-20-2013, 08:13 PM
  2. [SOLVED] 2010VBA AutoHide(&unhide) rows based on dynamic cell value
    By epicurean in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2013, 01:30 PM
  3. Replies: 0
    Last Post: 12-03-2012, 05:17 PM
  4. find semi-duplicate rows and delete row less value?
    By bsfell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2011, 05:54 PM
  5. How to add semi colon : ?
    By OceanBlue in forum Excel General
    Replies: 4
    Last Post: 04-27-2011, 08:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1