+ Reply to Thread
Results 1 to 11 of 11

checkbox that keeps portion of rows that contain specific text

  1. #1
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    checkbox that keeps portion of rows that contain specific text

    Hi excel forum, this is a great site always useful to me. i need some help with VBA in excel.
    Im trying to write a simple macro for a checkbox. ive attached a sample worksheet to this post, hopefully it shows a before and after example.

    what is needed is = when I check the extreme low flow checkbox I need each gage (all 3 gages) with the specific text(extreme low flow) in their row to stay visible, and all other rows not containing the specific text to delete when unchecked.

    For example, if i check extreme low flow each gage with a row that contains extreme low flow with keep the row and delete the rest. Not filter, the rows must stay exactly where they are, its date sensitive.

    Im having a difficult time writing this out, so check the example attachment
    dashboard_gages_excelforum.1.xlsm

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: checkbox that keeps portion of rows that contain specific text

    hi shivernoz, I'm not sure I understood your "not filter" remark but check the attachment. Checking - leaves extreme low flow rows intact, unchecking - deletes everything except header.

    The code does not use linked cells table in B:C columns.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: checkbox that keeps portion of rows that contain specific text

    Hi watersev, this works well except that when unchecked instead of deleting everything, id like to see all the data again.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: checkbox that keeps portion of rows that contain specific text

    will it be acceptable to change font color to white for unnecessary data on checking?

  5. #5
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: checkbox that keeps portion of rows that contain specific text

    sure that sounds good!

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: checkbox that keeps portion of rows that contain specific text

    please check attachment
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: checkbox that keeps portion of rows that contain specific text

    Now that is impressive, I thank you for you time towards this.

  8. #8
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: checkbox that keeps portion of rows that contain specific text

    Quick question If i wanted to change the extreme low flow to high flow, what would i need to change in the code to do this?? I tried replaced just extreme low flow to high flow but this doesnt do anything.

  9. #9
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: checkbox that keeps portion of rows that contain specific text

    This attachment works well, but instead of changing the color, is it possible to just delete the unecessary data when checked, then when unchecked it goes back to normal?

  10. #10
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: checkbox that keeps portion of rows that contain specific text

    Quote Originally Posted by shivernoz View Post
    Quick question If i wanted to change the extreme low flow to high flow, what would i need to change in the code to do this?? I tried replaced just extreme low flow to high flow but this doesn't do anything.
    You should write the "filtering" string correctly: "extreme low flow" or "high flow pulse"

    Option to make it with deleting contents of the unnecessary cells
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    03-08-2013
    Location
    Alpine,Texas
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: checkbox that keeps portion of rows that contain specific text

    Thank you, I did try it with the correct filter high flow pulse, but it didn't work. Anyway I tried it with the current up to date version and it performs great. West Texas thanks you! This is for a hydrological water budget of the Rio grande, and how climate has effected the river, you have helped so much.

+ 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. Convert portion of numeric input to specific text
    By skardos in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2013, 08:39 AM
  2. Deleting rows if specific cell is blank or have specific text
    By JoaoFerreira1985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2013, 01:18 PM
  3. Replies: 3
    Last Post: 02-16-2013, 06:10 PM
  4. Extract a specific portion of a text string in Excel?
    By drawkcaB in forum Excel General
    Replies: 3
    Last Post: 05-18-2010, 01:48 PM
  5. Searching for Text String and copying specific portion based on characters
    By undergraduate in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-30-2010, 12:45 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