Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CDAK
 
Posts: n/a
Default 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.
  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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

In article ,
"CDAK" 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   Report Post  
CDAK
 
Posts: n/a
Default

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
HIS


"CDAK" wrote in message
...
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   Report Post  
Nick Hodge
 
Posts: n/a
Default

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
HIS


"CDAK" wrote in message
...
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
HIS


"CDAK" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"