Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #109391
| From | isabelle <i@v.invalid> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Colormarking of fields based on colors in another sheet (difficult !!) |
| Date | 2016-10-09 23:23 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ntf1k5$7v9$1@gioia.aioe.org> (permalink) |
| References | <e9edca3a-b3be-413f-a975-28d241aa24e8@googlegroups.com> <nt9h4q$cca$1@gioia.aioe.org> <297fe042-43bc-47a8-b632-696ea0d2e184@googlegroups.com> <ntc84b$7qu$1@gioia.aioe.org> <525b61cd-f34b-4502-aea8-1026a85fdbbc@googlegroups.com> |
hi Johan,
i do not good understand the conditions for colors (Column M and X till CU), i
hope you could adapt the macro for this part
otherwise, please return here asking for details ...
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
TargetRow = Target.Row
rw = Application.Match(Range("I" & TargetRow), Sheets("Codes").Range("I:I"), 0)
'Step1: The existing filled colored in this sheet in column L and M and X till
CU, to change to 'no color'.
If Target.Column = 12 Then 'column "L"
If Sheets("Data").Range("L" & TargetRow) <> "" Then
Sheets("Codes").Range("L" & rw & ":CU" & rw).Copy
Sheets("Data").Range("L" & TargetRow).PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
Else
Sheets("Data").Range("L" & TargetRow & ":CU" & TargetRow).Interior.Color =
xlNone
'clear the datas in this line (Mx:CUx), if date was cleared ?
End If
Target.Select
Application.EnableEvents = True
End If
'Step2:
If Target.Column = 13 Or (Target.Column >= 24 And Target.Column <= 99) Then
'(Column M and X till CU)
datacolor = Sheets("Codes").Cells(rw, Target.Column).Interior.Color
Select Case datacolor
Case 15986394: Target.Interior.Color = 6750054
Case 16777215: Target.Interior.Color = 255
End Select
Application.EnableEvents = True
End If
End Sub
isabelle
Le 2016-10-09 à 01:51, jmslab@xs4all.nl a écrit :
> Yes, It works :)
>
> The download link is created. The file is downloadable within 21hrs.
> In the file I'd explained my question clear with examples.
> It's a bit changed then I'd asked earlier.
> Hopely you can help me out. Thanks !
>
> The link has been created: http://www.cjoint.com/c/FJjfVKxvOEJ
>
> regards,
> Johan
>
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Colormarking of fields based on colors in another sheet (difficult !!) jmslab@xs4all.nl - 2016-10-04 09:01 -0700
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-07 21:11 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) jmslab@xs4all.nl - 2016-10-08 09:51 -0700
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-08 21:56 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) jmslab@xs4all.nl - 2016-10-08 22:51 -0700
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-09 23:23 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-10 03:57 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-10 04:24 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) jmslab@xs4all.nl - 2016-10-10 04:20 -0700
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-13 22:37 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) jmslab@xs4all.nl - 2016-10-13 20:40 -0700
Re: Colormarking of fields based on colors in another sheet (difficult !!) isabelle <i@v.invalid> - 2016-10-14 09:01 -0400
Re: Colormarking of fields based on colors in another sheet (difficult !!) xethubao 123 <xethubao 123@gmail.com> - 2016-10-10 02:38 +0100
csiph-web