+ Reply to Thread
Results 1 to 5 of 5

Column Width

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Column Width

    Hi

    I got this macro from someone else, but realised it does the complete opposite of what i want!

    Please Login or Register  to view this content.
    I want to only show the columns (so usually width of 64 pixels) and reduce the column width of everything else to 0

    This code reduces the column width of the cells i want to see to 0

    My value is in cell H1 and if it says "kiwi" i want it to show all columns from b7 onwards horizontally that contain kiwi, again this does the opposite.

    Hopefully someone could help me out?

    Cheers

    Dan

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Column Width

    Hi, Dan,

    maybe use
    Please Login or Register  to view this content.
    and set all column widths to 0 before.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    916

    Re: Column Width

    Change your code to:
    Please Login or Register  to view this content.
    Last edited by rollis13; 11-15-2013 at 01:43 PM.

  4. #4
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Column Width

    Brilliant thank you both

  5. #5
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    916

    Re: Column Width

    Glad being of some help .

+ 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. Column Width vs. Text Width
    By jlt199 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 11:45 AM
  2. [SOLVED] Automatically adjust column width to longest value in column
    By Grimace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 08:18 PM
  3. how to move cells in a column with different column width
    By ajish002 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-07-2012, 03:26 PM
  4. [SOLVED] Set Column Width Based On Total Width Of Other Columns
    By rayneraingoaway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 06:10 PM
  5. [SOLVED] Setting column width if #### appears in column
    By qwerty in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-09-2006, 11:10 AM

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