+ Reply to Thread
Results 1 to 7 of 7

Selecting active area on sheets with validation lists and conditional formatting...

  1. #1
    Registered User
    Join Date
    12-02-2010
    Location
    Shanghai China
    MS-Off Ver
    Excel 2003
    Posts
    9

    Post Selecting active area on sheets with validation lists and conditional formatting...

    Hi All,

    I have a workbook with 20 sheets out of which 3 are named “Country”, “Region” and “Sub Region”. The remaining 17 sheets contain feedback from users from various countries and regions.

    The design of the 17 sheets is as follows:
    Users enter their names, countries, regions and sub regions via a validation list in cells D4-D7. They then move on to fill several rows of data (Range “B9:N9”). Some of these are selected via a validation list to reduce input error. I have copied the validation lists and formats from B9:N9 to B109:N109. Users don’t fill 100 entries, but I copied the formats on 100 rows to be on the safe side.

    The Country, Region and Sub Region sheets are for summary purposes. A user selects a geographical location, and a macro loops through the 17 sheets and copies entries from “USA” for example.
    The problem I’m having is that the macros I currently have copies from Ranges B9:N9 to Ranges B109:N109 onto the destination sheet, so even though I have the results I want, I have empty rows between results.

    Please HELP!

    Please Login or Register  to view this content.
    I’ve been told to use a “First Row” and “Last Row” to declare the active area on each sheet before copying them over onto the destination sheet. However, my beginner VBA skills limit me from doing that…

    Please help!!
    Last edited by shoesterix; 12-07-2010 at 09:29 PM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Selecting active area on sheets with validation lists and conditional formatting.

    Begin with not using select or activate in VBA.

    use
    Please Login or Register  to view this content.
    Instead of
    Please Login or Register  to view this content.
    and use
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    Last edited by snb; 12-06-2010 at 07:29 AM.



  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Selecting active area on sheets with validation lists and conditional formatting.

    Is this what you mean?
    Please Login or Register  to view this content.

    Is the message box meant to show for every sheet that has no relevant records?
    I'm not sure what the last if statement is meant to achieve
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    12-02-2010
    Location
    Shanghai China
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Selecting active area on sheets with validation lists and conditional formatting.

    Hi,

    The headings for the 17 sheets are on B8:N8 and headings for the destination sheet are on B11:N11. This macro deletes the headings on the destination ("Country") sheet. I got an error saying "This operation requires the merged cells to be identically sized".

    I apologize, but I forgot to mention that whenever a user selects a different country on the Destination sheet, the previous results are deleted, and only the records from the selected country will be displayed on the destination sheet.

    Thank you!

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Selecting active area on sheets with validation lists and conditional formatting.

    Don't complicate things with merged cells, if you want pretty pictures use Photoshop/PaintShop Pro.

    I think it is time for you to provide a sample workbook that shows some typical data and clearly demonstrates your problem.

  6. #6
    Registered User
    Join Date
    12-02-2010
    Location
    Shanghai China
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Selecting active area on sheets with validation lists and conditional formatting.

    Please see attached file.

    Thanks again!
    Attached Files Attached Files

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Selecting active area on sheets with validation lists and conditional formatting.

    Try this
    Please Login or Register  to view this content.

    Providing a workbook always makes you problem clearer, and usually ensures a faster solution to your problem.

    Hope this helps
    Attached Files Attached Files
    Last edited by Marcol; 12-07-2010 at 06:28 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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