+ Reply to Thread
Results 1 to 1 of 1

Copy only visible columns with conditional Formatting

  1. #1
    Registered User
    Join Date
    04-10-2017
    Location
    Europe
    MS-Off Ver
    2013
    Posts
    5

    Copy only visible columns with conditional Formatting

    Hello,

    Can I start by thanking the people in this forum for the wealth of knowledge contained within it. It makes things accessible, even for a complete novice like myself.

    Ok, on to my request for help, as I cannot get over this hurdle....

    I am building a data tracker for my research lab, where an analyst can highlight a selection of data and by clicking a button, send the data to the team.

    I have a set of buttons in my spreadsheet that will hide all columns, except some up front info columns (colums B:I) followed by the chosen test data. (e.g. click "Karl Fischer" and columns B:I (info columns) will display followed by columns BB:BC (test data)

    Alot of the columns from J:BC have conditional formatting in them, and I was aided greatly by another thread in this forum which creates the email with the conditional formatting:- https://www.excelforum.com/excel-pro...ml#post4626411

    However, the goal is that we will be able display certain data (using buttons), highlight the visible cells starting in column B, and by clicking "Email Results to Team" the selected table (visible) will be copied accross to an email with the conditonal formating.

    I have tried hard to build in the funtionality to only copy the visible cells, taking infomation from https://www.rondebruin.nl/win/s1/outlook/bmail2.htm with the following code:-

    Set rng = Nothing
    On Error Resume Next
    'Only the visible cells in the selection
    Set rng = Selection.SpecialCells(xlCellTypeVisible)
    'You can also use a fixed range if you want
    'Set rng = Sheets("YourSheet").Range("D4:D12").SpecialCells(xlCellTypeVisible)
    On Error GoTo 0

    However, I am just not knowledgable enough to add this funtionality...

    The code I got from the previous thread in this forum does everything I need it to do, except to only copy across only visible cells. I would be very grateful for any guidence that could be offered by more skilled fellow humans!

    The code I would like to modify, is in Module 5 and below

    Please Login or Register  to view this content.
    In hope

    Protonspounge
    Attached Files Attached Files
    Last edited by Protonspounge; 04-11-2017 at 04:56 AM. Reason: Added attachement

+ 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. vba copy specific columns with visible rows to another sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-11-2016, 02:47 PM
  2. Use conditional formatting only on visible not hidden cells
    By JackBauer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-24-2014, 08:26 AM
  3. Conditional formatting: Applied rules not visible when printing
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 03:32 PM
  4. [SOLVED] VBA - Filter, Copy and Paste Visible Columns If Cell has Value
    By gurlygal in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-30-2012, 08:10 AM
  5. [SOLVED] Vba Code: Copy Visible columns ( after using Auto Filter)
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2012, 03:28 PM
  6. [SOLVED] Conditional Formatting Shading For Visible Rows Only
    By manda in forum Excel General
    Replies: 3
    Last Post: 05-22-2006, 05:42 PM
  7. [SOLVED] copy and paste visible columns
    By ferde in forum Excel General
    Replies: 1
    Last Post: 12-08-2005, 04:55 AM

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