Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #109368 > unrolled thread
| Started by | jmslab@xs4all.nl |
|---|---|
| First post | 2016-10-04 09:01 -0700 |
| Last post | 2016-10-10 02:38 +0100 |
| Articles | 13 — 3 participants |
Back to article view | Back to microsoft.public.excel.programming
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
| From | jmslab@xs4all.nl |
|---|---|
| Date | 2016-10-04 09:01 -0700 |
| Subject | Colormarking of fields based on colors in another sheet (difficult !!) |
| Message-ID | <e9edca3a-b3be-413f-a975-28d241aa24e8@googlegroups.com> |
Hello, big challange to make ! (for me). Perhaps somebody can help me out. In Sheet1 I have 66 Columns and appr 60 records. Column A = TextCode1 (like 3A, 3B, etc..), Column B = TextCode2 (like A, B, etc..), Column C till BN is heading nr.1 till 64. In the records of Column C till BN are specific records only 'green' colored (filled color). There is no data/value registered in it. Only the color. In Sheet2 I have the same columns but now started from Column K. (TextCode1 in Column K, TextCode2 in Column L and the headings nr.1 till 64 in the Columns M till BX). In sheet 2 are in the datafields of column M till BX values registered. I like to have a module which; Loop in Sheet2 from record 2 till last. Based on TextCode1+TextCode2, Lookup in Sheet1 to the identical TextCode1+TextCode2 and then copy the colorformat from that row (from C till BN) from sheet 1 to this record in sheet2 in the columns M till BX of the specific record of the loop. Based on the identical code, you will get then the same colored records. Finally; A module thats overlooks all records in Sheet2. If the colored record is 'green' but there's no value registered, then color the field 'orange'. If there's is a value registered in a field that isn't 'green' then color the record 'red'. So,...... if there's a better creator then me :) So please. Thanks !! regards, Johan.
[toc] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-07 21:11 -0400 |
| Message-ID | <nt9h4q$cca$1@gioia.aioe.org> |
| In reply to | #109368 |
i Johan, if you could upload the file on (cjoint.com, or other ) course without confidentielles' data, it would help us to help you! isabelle Le 2016-10-04 à 12:01, jmslab@xs4all.nl a écrit : > Hello, big challange to make ! (for me). Perhaps somebody can help me out. > > > In Sheet1 I have 66 Columns and appr 60 records. Column A = TextCode1 (like > 3A, 3B, etc..), Column B = TextCode2 (like A, B, etc..), Column C till BN is > heading nr.1 till 64. In the records of Column C till BN are specific records > only 'green' colored (filled color). There is no data/value registered in it. > Only the color. > > In Sheet2 I have the same columns but now started from Column K. (TextCode1 > in Column K, TextCode2 in Column L and the headings nr.1 till 64 in the > Columns M till BX). In sheet 2 are in the datafields of column M till BX > values registered. > > I like to have a module which; > > Loop in Sheet2 from record 2 till last. Based on TextCode1+TextCode2, Lookup > in Sheet1 to the identical TextCode1+TextCode2 and then copy the colorformat > from that row (from C till BN) from sheet 1 to this record in sheet2 in the > columns M till BX of the specific record of the loop. Based on the identical > code, you will get then the same colored records. > > Finally; A module thats overlooks all records in Sheet2. If the colored > record is 'green' but there's no value registered, then color the field > 'orange'. If there's is a value registered in a field that isn't 'green' then > color the record 'red'. > > So,...... if there's a better creator then me :) So please. Thanks !! > > regards, Johan.
[toc] | [prev] | [next] | [standalone]
| From | jmslab@xs4all.nl |
|---|---|
| Date | 2016-10-08 09:51 -0700 |
| Message-ID | <297fe042-43bc-47a8-b632-696ea0d2e184@googlegroups.com> |
| In reply to | #109380 |
Thanks. Can you provide me an email adres were I can sent it to. Or is there a possiblity to include attachements in this groups (I can find it). You can send me the adress to jmslab@xs4all.nl regards, Johan.
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-08 21:56 -0400 |
| Message-ID | <ntc84b$7qu$1@gioia.aioe.org> |
| In reply to | #109381 |
can you put a file on http://www.cjoint.com/ and return here to give us the download link isabelle Le 2016-10-08 à 12:51, jmslab@xs4all.nl a écrit : > Thanks. > Can you provide me an email adres were I can sent it to. > Or is there a possiblity to include attachements in this groups (I can find it). > You can send me the adress to jmslab@xs4all.nl > > regards, Johan. > >
[toc] | [prev] | [next] | [standalone]
| From | jmslab@xs4all.nl |
|---|---|
| Date | 2016-10-08 22:51 -0700 |
| Message-ID | <525b61cd-f34b-4502-aea8-1026a85fdbbc@googlegroups.com> |
| In reply to | #109382 |
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
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-09 23:23 -0400 |
| Message-ID | <ntf1k5$7v9$1@gioia.aioe.org> |
| In reply to | #109384 |
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
>
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-10 03:57 -0400 |
| Message-ID | <ntfhlc$sbf$1@gioia.aioe.org> |
| In reply to | #109391 |
if you could add table for colors, for example: http://www.cjoint.com/c/FJkh34CPlOa isabelle
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-10 04:24 -0400 |
| Message-ID | <ntfj77$v81$1@gioia.aioe.org> |
| In reply to | #109393 |
sorry, for have forgetting a possibility http://www.cjoint.com/c/FJkitFkiWMa isabelle Le 2016-10-10 à 03:57, isabelle a écrit : > if you could add table for colors, for example: > http://www.cjoint.com/c/FJkh34CPlOa > > isabelle
[toc] | [prev] | [next] | [standalone]
| From | jmslab@xs4all.nl |
|---|---|
| Date | 2016-10-10 04:20 -0700 |
| Message-ID | <b8c15e2a-6d76-461a-8200-9437de420abb@googlegroups.com> |
| In reply to | #109394 |
Isabelle, Thanks a lot. You created it now as a ChangeWorksheet module. Can you please change it in a general one were I can push a button to run it. I will place it then under modules instead of direct under the datasheet. ps. I do not realy understand your question about the color table. I have to read that first in more detail, and then I will come back on that later.
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-13 22:37 -0400 |
| Message-ID | <ntpgca$158a$2@gioia.aioe.org> |
| In reply to | #109401 |
Le 2016-10-10 à 07:20, jmslab@xs4all.nl a écrit :> Isabelle, Thanks a lot.
> You created it now as a ChangeWorksheet module. Can you please change it in a
> general one were I can push a button to run it. I will place it then under
> modules instead of direct under the datasheet. ps. I do not realy understand
> your question about the color table. I have to read that first in more
> detail, and then I will come back on that later.
voilà,
Private Sub test()
green = 6750054
red = 255
blue = 15986394
orange = 49407
cNone = 16777215
TargetRow = Selection.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 Selection.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
Selection.Select
End If
'Step2:
For Each c In Sheets("Data").Range("M" & TargetRow & ":CU" & TargetRow)
rw1 = Application.Match(Range("I" & TargetRow),
Sheets("Codes").Range("I:I"), 0)
addr = Cells(rw1, Selection.Column).Address
CodeColor = Sheets("Codes").Range(addr).Interior.color
With Target.Interior
Select Case CodeColor
Case blue
If Target <> 0 Then .color = green Else .color = CodeColor
Case cNone
If Target <> 0 Then .color = red Else .color = orange
Case cNone
If Target = 0 Then .color = CodeColor
End Select
End With
Next
End Sub
isabelle
[toc] | [prev] | [next] | [standalone]
| From | jmslab@xs4all.nl |
|---|---|
| Date | 2016-10-13 20:40 -0700 |
| Message-ID | <ee390503-33cd-49ee-8de4-8b3833b2e3f6@googlegroups.com> |
| In reply to | #109427 |
Isabella, Thanks again !. regards, Johan
[toc] | [prev] | [next] | [standalone]
| From | isabelle <i@v.invalid> |
|---|---|
| Date | 2016-10-14 09:01 -0400 |
| Message-ID | <ntqkvc$rvh$1@gioia.aioe.org> |
| In reply to | #109427 |
Le 2016-10-13 à 22:37, isabelle a écrit : > Le 2016-10-10 à 07:20, jmslab@xs4all.nl a écrit :> Isabelle, Thanks a lot. >> You created it now as a ChangeWorksheet module. Can you please change it in a >> general one were I can push a button to run it. I will place it then under >> modules instead of direct under the datasheet. ps. I do not realy understand >> your question about the color table. I have to read that first in more >> detail, and then I will come back on that later. > forget the previous proposal, rather look this one http://www.cjoint.com/c/FJonbgUBr8a isabelle
[toc] | [prev] | [next] | [standalone]
| From | xethubao 123 <xethubao 123@gmail.com> |
|---|---|
| Date | 2016-10-10 02:38 +0100 |
| Message-ID | <xethubao.123.1240a909@excelbanter.com> |
| In reply to | #109368 |
'Chuyển nhÃ* thÃ*nh hưng ' (http://tinyurl.com/gob5ry7) 'Chuyển nhÃ* trá»n gói' (http://dichvuchuyennhatrongoi.org.vn/)Phó Thá»§ tướng Trương Hòa Bình cÅ©ng đã chỉ đạo Bá»™ Công an khẩn trương thá»±c hiện ý kiến chỉ đạo cá»§a Tổng BÃ* thư Nguyá»…n Phú Trá»ng tại văn bản số 1578-CV/VPTW cá»§a Văn phòng Trung ương Äảng vá» việc chỉ đạo cÆ¡ quan chức năng cá»§a Bá»™ Công an Ä‘iá»u tra lÃ*m rõ các vi phạm dẫn đến thua lá»— gần 3.300 tá»· đồng giai Ä‘oạn 2012-2013 tại PVC, báo cáo Tổng BÃ* thư vÃ* Thá»§ tướng ChÃ*nh phá»§. Thanh tra ChÃ*nh phá»§ được giao nhiệm vụ tiếp tục lÃ*m rõ các vi phạm trong việc đầu tư, thá»±c hiện các dá»± án cá»§a PVC giai Ä‘oạn 2008-2013, xác định rõ trách nhiệm cá»§a táº*p thể, cá nhân có liên quan, trong đó có trách nhiệm cá»§a ngưá»i đứng đầu vÃ* đỠxuất xá»* lý, báo cáo Thá»§ tướng ChÃ*nh phá»§ trong tháng 10 tá»›i. Phó Thá»§ tướng Trương Hòa Bình chỉ đạo Bá»™ TÃ*i chÃ*nh, Bá»™ Công Thương xác định việc lá»— lÅ©y kế gần 3.300 tá»· đồng cá»§a PVC giai Ä‘oạn 2012-2013 có bảo toÃ*n vốn hay không; có văn bản gá»*i Bá»™ Công an vÃ* Thanh tra ChÃ*nh phá»§ để phối hợp xá»* lý, báo cáo kết quả lên Thá»§ tướng ChÃ*nh phá»§ 'Chuyển nhÃ* thÃ*nh hưng ' (http://chuyennhathanhhunghanoi.com/) -- xethubao 123
[toc] | [prev] | [standalone]
Back to top | Article view | microsoft.public.excel.programming
csiph-web