+ Reply to Thread
Results 1 to 8 of 8

Clearing volatile cell ranges

  1. #1
    Registered User
    Join Date
    04-10-2009
    Location
    Phoenix, Arizona
    MS-Off Ver
    2003
    Posts
    7

    Clearing volatile cell ranges

    Hello, and thanks for taking the time to stop and read my help request.

    This is extremely difficult to explain due in part to my limited knowledge of excel, but I will try my best.

    I have an excel form where a user can insert a row of information and after insertion a macro automatically sorts the data into the rest of the dataset.

    I also have it set up so that before printing, all blank cells are hidden via autofilter.

    The problem is that after printing, I would like the option to clear one column of user entered data, but only among a certain range of rows.

    So, my question boils down to: How do I clear the range when I am unsure of how many rows there will be? (If this is even possible)

    I have uploaded a screenshot of the form to give some context. Please let me know if I should upload a sample work book, although I doubt it will be any good without having to explain how to use the form.

    Thanks in advance for your tips and words of wisdom!

    [edit] What I had thought about doing was something along these lines:
    Please Login or Register  to view this content.
    and then utilizing "Selection.Rows.Count" in some fashion to deselect the "Header" cell/row.
    Attached Images Attached Images
    Last edited by Quail; 04-21-2009 at 06:37 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Clearing volatile cell ranges

    Hello Quail,

    After looking at the screen shot, it appears you want to clear the "Quantity" column after it has been filtered. What I'm not sure about is are you going to manually select the rows to be deleted?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-10-2009
    Location
    Phoenix, Arizona
    MS-Off Ver
    2003
    Posts
    7

    Re: Clearing volatile cell ranges

    Thank you for your response.

    I must have mis-stated something. I don't want to delete any rows, I only want to clear the contents of the column (you were correct in assuming 'quantity')

  4. #4
    Registered User
    Join Date
    04-10-2009
    Location
    Phoenix, Arizona
    MS-Off Ver
    2003
    Posts
    7

    Re: Clearing volatile cell ranges

    Not sure what the policy is on on bumping, but...

    "bump!"

    I apologize if this is against the rules. I checked the sticky and didn't see anything.

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Clearing volatile cell ranges

    Think Leith was trying to give you a more tailored reply.

    See if attached help

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  6. #6
    Registered User
    Join Date
    04-10-2009
    Location
    Phoenix, Arizona
    MS-Off Ver
    2003
    Posts
    7

    Re: Clearing volatile cell ranges

    Thanks VBA NOOB, I think you're understanding me; However, I'm not sure I'm implementing the code you gave me correctly. It doesn't clear the entire column, only the topmost row... I'll tinker with your code to try and fix that. Thank you for your help!!

    Here's my sub:
    Please Login or Register  to view this content.
    Last edited by Quail; 04-30-2009 at 05:47 PM.

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Clearing volatile cell ranges

    Does for me.
    Post a sample file

    VBA Noob

  8. #8
    Registered User
    Join Date
    04-10-2009
    Location
    Phoenix, Arizona
    MS-Off Ver
    2003
    Posts
    7

    Re: Clearing volatile cell ranges

    Got it: changed the range from "C4" (The first row in the range) to "C3" (The header row) as well as re-coded it to simply re-name the header cell.

    Please Login or Register  to view this content.
    It's cheap, but it works! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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