+ Reply to Thread
Results 1 to 3 of 3

Write code to format cells

  1. #1
    Registered User
    Join Date
    02-25-2024
    Location
    Canada
    MS-Off Ver
    Office 365 V2401
    Posts
    33

    Write code to format cells

    Hello

    I have a formula in D2 (Sheet1) that spills information depending on what the user enters in [B2:B3]. I would like someone to show me how to write code to format the cells (spilled data range) to have thick outside borders around perimeter and thin on the inside like shown in sample attached. I would also like the cell formatting to disappear when the user clears cells [B2:B3].

    Thank you

    J
    Attached Files Attached Files
    Last edited by Jay325; 02-25-2024 at 10:08 PM.

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Write code to format cells

    Paste the following procedure into the Sheet1 module, not the standard module (e.g. Module1):
    Please Login or Register  to view this content.
    Artik

  3. #3
    Registered User
    Join Date
    02-25-2024
    Location
    Canada
    MS-Off Ver
    Office 365 V2401
    Posts
    33

    Re: Write code to format cells

    Works great! thx Artik

+ 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. Replies: 2
    Last Post: 02-20-2023, 03:27 PM
  2. [SOLVED] Write Sub procedure to format excel and write case/if statement to text file
    By vbronton in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-06-2018, 08:26 AM
  3. How to format a code to write values to create a text file?
    By DakotaRoss in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2013, 09:13 AM
  4. Help with code; write over if cells match
    By danpo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2011, 05:28 AM
  5. Code to write data to cells
    By aggie2011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2010, 12:14 PM
  6. write a macro that changes format of selected cells
    By DKY in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2006, 03:34 PM
  7. Combining Cells-write a code to get both values
    By Greg B... in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2005, 12:06 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