+ Reply to Thread
Results 1 to 5 of 5

How to edit row height with conditional formatting?

  1. #1
    CDAK
    Guest

    How to edit row height with conditional formatting?

    I want to edit row height with conditional formatting. I have a query behind
    my spreadsheet and there are 3 types of products it returns (X, Y, Z). When
    it returns a Z product (product is a column heading), I want the row height
    to be much smaller than if it returns a X or Y product. Does anyone know how
    this can be done? Thanks.

  2. #2
    Nick Hodge
    Guest

    Re: How to edit row height with conditional formatting?

    Cannot be done without code

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    [email protected]HIS


    "CDAK" <[email protected]> wrote in message
    news:[email protected]...
    >I want to edit row height with conditional formatting. I have a query
    >behind
    > my spreadsheet and there are 3 types of products it returns (X, Y, Z).
    > When
    > it returns a Z product (product is a column heading), I want the row
    > height
    > to be much smaller than if it returns a X or Y product. Does anyone know
    > how
    > this can be done? Thanks.




  3. #3
    JE McGimpsey
    Guest

    Re: How to edit row height with conditional formatting?

    not with Conditional Formatting. It could probably be done with a VBA
    event macro.

    In article <[email protected]>,
    "CDAK" <[email protected]> wrote:

    > I want to edit row height with conditional formatting. I have a query behind
    > my spreadsheet and there are 3 types of products it returns (X, Y, Z). When
    > it returns a Z product (product is a column heading), I want the row height
    > to be much smaller than if it returns a X or Y product. Does anyone know how
    > this can be done? Thanks.


  4. #4
    CDAK
    Guest

    Re: How to edit row height with conditional formatting?

    Is this code complicated or is it a simple sub? I've used VB a little bit in
    the past but never with Excel so I don't really know where to begin. Can you
    give me a little help with the code if you have the time?

    "Nick Hodge" wrote:

    > Cannot be done without code
    >
    > --
    > HTH
    > Nick Hodge
    > Microsoft MVP - Excel
    > Southampton, England
    > [email protected]HIS
    >
    >
    > "CDAK" <[email protected]> wrote in message
    > news:[email protected]...
    > >I want to edit row height with conditional formatting. I have a query
    > >behind
    > > my spreadsheet and there are 3 types of products it returns (X, Y, Z).
    > > When
    > > it returns a Z product (product is a column heading), I want the row
    > > height
    > > to be much smaller than if it returns a X or Y product. Does anyone know
    > > how
    > > this can be done? Thanks.

    >
    >
    >


  5. #5
    Nick Hodge
    Guest

    Re: How to edit row height with conditional formatting?

    You would need to use Worksheet_Change() event code. The code below checks
    to see if the change is in column A. If the entry in columnA is a 'Z'. (This
    can be changed to anything) then it adjusts the row height to 5. If it is
    anything else it remains untouched. Just a starter bit of code. Here's how
    you implement it.
    (http://www.nickhodge.co.uk/vba/vbaim....htm#eventcode)

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Application.Intersect(Columns("A:A"), Target) Is Nothing Then
    With Application
    .EnableEvents = False
    If UCase(Target.Value) = "Z" Then
    Target.RowHeight = 5
    End If
    .EnableEvents = True
    End With
    End If
    End Sub

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    [email protected]HIS


    "CDAK" <[email protected]> wrote in message
    news:[email protected]...
    > Is this code complicated or is it a simple sub? I've used VB a little bit
    > in
    > the past but never with Excel so I don't really know where to begin. Can
    > you
    > give me a little help with the code if you have the time?
    >
    > "Nick Hodge" wrote:
    >
    >> Cannot be done without code
    >>
    >> --
    >> HTH
    >> Nick Hodge
    >> Microsoft MVP - Excel
    >> Southampton, England
    >> [email protected]HIS
    >>
    >>
    >> "CDAK" <[email protected]> wrote in message
    >> news:[email protected]...
    >> >I want to edit row height with conditional formatting. I have a query
    >> >behind
    >> > my spreadsheet and there are 3 types of products it returns (X, Y, Z).
    >> > When
    >> > it returns a Z product (product is a column heading), I want the row
    >> > height
    >> > to be much smaller than if it returns a X or Y product. Does anyone
    >> > know
    >> > how
    >> > this can be done? Thanks.

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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