+ Reply to Thread
Results 1 to 4 of 4

Code for oulining cell iff not empty,

  1. #1
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Code for oulining cell iff not empty,

    I wont a code to copy a row to another workbook in to columns. And then when a cell is not empty outline the cell.
    This is what if have so far. How can i ad code for the oulining part?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Code for oulining cell iff not empty,

    Use Conditional Formatting.

    You do not need VBA for that





    Select All Cells

    Select the Home tab and then Conditional Formatting

    Select New Rule and then "Use Formula to determine Format"

    Enter this into the Formula Box

    =A1<>""

    Select Format and then choose your format





    Use Pastespecial, Values, transpose


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 03-26-2019 at 02:22 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Code for oulining cell iff not empty,

    Quote Originally Posted by mehmetcik View Post
    Use Conditional Formatting.

    You do not need VBA for that





    Select All Cells

    Select the Home tab and then Conditional Formatting

    Select New Rule and then "Use Formula to determine Format"

    Enter this into the Formula Box

    =A1<>""

    Select Format and then choose your format
    Won't work because it wil also copy the format of the original cell. That has already a outline. But because it is copied fro vertical to horizontal the layout is not ok anymore, therefor i have to change the outline every time something is added.

  4. #4
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Code for oulining cell iff not empty,

    I find something. But this will freeze Excel. I think it is better to run a macro after the cells are copies.
    Please Login or Register  to view this content.

+ 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. [SOLVED] vba code to find and paste data to next empty cell, not last empty cell
    By hkbhansali in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2018, 10:48 AM
  2. Need code to add textbox1 value to next empty cell in row 1.
    By dollada06 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2016, 01:17 PM
  3. Trim code to exit code if cell is empty
    By excellenthelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2013, 12:08 PM
  4. [SOLVED] still have empty cell after run Delete empty cells code
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 04:28 PM
  5. Find next Empty Cell using VBA code.
    By Lensmeister in forum Excel General
    Replies: 2
    Last Post: 09-16-2011, 09:33 AM
  6. VBA code if cell is empty
    By almosala in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-31-2011, 08:46 AM
  7. [SOLVED] Select Until Empty Cell From VBA Code
    By Eric in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2005, 11:06 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