#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Dorp-Down Formatting

Here is a VBA example:

Suppose we have the data validation input in cell A1 and the actual list in
H1 thru H10 ( each item with its own unique format ). In worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then
Exit Sub
End If
v = Target.Value
Application.EnableEvents = False
For i = 1 To 10
If v = Cells(i, "H").Value Then
Cells(i, "H").Copy
Target.PasteSpecial Paste:=xlPasteFormats
Application.EnableEvents = True
Exit Sub
End If
Next
Application.EnableEvents = True
End Sub

This routine activates once A1 is filled and then looks down the list to
find the match. Once found, the routine copies the format of the matched
cell back to A1

REMEMBER: worksheet code
--
Gary''s Student
gsnu200712

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 based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
expanding custom formatting without removing existing cell formatting? Keith Excel Worksheet Functions 3 December 27th 06 01:54 PM
dorp down lists jason2444 Excel Discussion (Misc queries) 2 April 18th 06 12:06 AM
Pivot Table border formatting and pivot chart formatting [email protected] Excel Discussion (Misc queries) 0 July 22nd 05 02:22 PM


All times are GMT +1. The time now is 01:47 AM.

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"