+ Reply to Thread
Results 1 to 38 of 38

What is the most number of consecutive colors.

Hybrid View

pixel34 What is the most number of... 12-16-2013, 02:19 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 02:23 AM
pixel34 Re: What is the most number... 12-16-2013, 02:39 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 02:55 AM
pixel34 Re: What is the most number... 12-16-2013, 03:16 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 03:21 AM
pixel34 Re: What is the most number... 12-16-2013, 03:22 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 03:27 AM
pixel34 Re: What is the most number... 12-16-2013, 03:35 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 03:47 AM
jindon Re: What is the most number... 12-16-2013, 03:42 AM
pixel34 Re: What is the most number... 12-16-2013, 03:58 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 04:03 AM
pixel34 Re: What is the most number... 12-16-2013, 05:25 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 05:31 AM
pixel34 Re: What is the most number... 12-16-2013, 03:52 AM
jindon Re: What is the most number... 12-16-2013, 05:15 AM
pixel34 Re: What is the most number... 12-16-2013, 04:03 AM
pixel34 Re: What is the most number... 12-16-2013, 04:09 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 04:18 AM
pixel34 Re: What is the most number... 12-16-2013, 04:34 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 05:01 AM
pixel34 Re: What is the most number... 12-16-2013, 05:23 AM
jindon Re: What is the most number... 12-16-2013, 05:32 AM
pixel34 Re: What is the most number... 12-16-2013, 05:38 AM
pixel34 Re: What is the most number... 12-16-2013, 05:34 AM
jindon Re: What is the most number... 12-16-2013, 05:44 AM
pixel34 Re: What is the most number... 12-16-2013, 06:45 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 07:08 AM
pixel34 Re: What is the most number... 12-16-2013, 06:14 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 06:45 AM
pixel34 Re: What is the most number... 12-16-2013, 07:25 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 07:28 AM
pixel34 Re: What is the most number... 12-16-2013, 07:41 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 07:50 AM
pixel34 Re: What is the most number... 12-16-2013, 07:55 AM
:) Sixthsense :) Re: What is the most number... 12-16-2013, 08:06 AM
pixel34 Re: What is the most number... 12-16-2013, 08:11 AM
  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    What is the most number of consecutive colors.

    Hi,
    I'm sorry for english.
    I will tell you that picture.
    If you know how to write macros;
    There to help.
    Thank you very much.
    ck521hqwmqnzvvo63.gif

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Instead of picture please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Hi, Sixthsense
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Function GetMax(rMyRng As Range, iColor As Integer) As Long
    Dim r As Range, lTemp As Long, lMax As Long
    
    Application.Volatile True
    
    For Each r In rMyRng
        If r.Font.ColorIndex = iColor Then
            lTemp = lTemp + 1
        Else
            If lTemp > lMax Then lMax = lTemp
            lTemp = 0
        End If
    Next r
    
    GetMax = lMax
    
    End Function
    =GetMax(Range,ColorNum)

    =GetMax(E2:K2,3)

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Hi, Sixthsense
    You worked very hard.
    A big thank you for that.

    There are also data on this page. And they should be exempted.
    To do this, your code. Buttons should work with.
    Results area will be written: (B2: B. .....)
    Where the area to be checked: (E2: K. ....)
    I hope. It was understandable.

    summary:
    Macro should work with the button.
    Work areas should be interfered with.
    (B2: B. ...) and (E2: K. ....)
    Last edited by pixel34; 12-16-2013 at 03:19 AM.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Sorry I am unable to understand your further requirement which you posted in Post #5

    You can adjust the range and use the UDF formula at anywhere in the workbook.

  7. #7
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Example;

    Sub Macro()
    '..............
    '..............
    End Sub

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    I am ready to convert the UDF to macro but before that I just want to know what is the draw back having it in UDF?

    Becuase I believe UDF is more flexible than the Macro code in this case.

  9. #9
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    I'm so sorry.
    destroy your valuable time.


    Whether your macro works as follows.
    (B2: last line) and (E2: K last line)

    And you're working with a macro button.

    Before I forget. Greetings from Anatolia to India.

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Try this code…

    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For i = 2 To lEndRw
        For Each r In rMyRng.Rows(i).Cells
            If r.Font.ColorIndex = 3 Then
                lTemp = lTemp + 1
            Else
                If lTemp > lMax Then lMax = lTemp
                lTemp = 0
            End If
        Next r
        Cells(i, "B").Value = lMax
        lMax = 0
    Next i
    
    End Sub

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: What is the most number of consecutive colors.

    Try
    Sub test()
        Dim i As Long, r As Range
        With Range("e2:k9")
            For i = 1 To .Rows.Count
                .Cells(i, -2).Value = GetMaxColor(.Rows(i))
            Next
        End With
    End Sub
    
    Function GetMaxColor(rng As Range) As Long
        Dim r As Range, n As Long, temp
        Application.Volatile
        For Each r In rng.Cells
            If (r.Font.ColorIndex <> xlAutomatic) * (r.Value <> "") Then
                If temp <> r.Font.Color Then
                    n = 1: temp = r.Font.Color
                    GetMaxColor = Application.Max(GetMaxColor, n)
                Else
                    n = n + 1
                    GetMaxColor = Application.Max(GetMaxColor, n)
                End If
            Else
                temp = 0
            End If
        Next
    End Function

  12. #12
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Hi, Sixthsense

    ultra super
    Thank you friend.

    With the same logic.
    Red was the color of column B
    Whether black colors column A
    possible?

  13. #13
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    To know the Number of the Font Color just place the cursor on that cell and Press Alt+F11 and Press Ctrl+G and copy paste the below code and hit enter.

    ?Activecell.Font.ColorIndex

    Which will get you the color of the font (In which the cursor is placed)

    In the below line of the provided code just replace the 3 (3 for red) to 1 (1 for black) with the number arrived in immediate window.

    If r.Font.ColorIndex = 3 Then

  14. #14
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Quote Originally Posted by jindon View Post
    Try
    Sub test()
        Dim i As Long, r As Range
        With Range("e2:k9")
            For i = 1 To .Rows.Count
                .Cells(i, -2).Value = GetMaxColor(.Rows(i))
            Next
        End With
    End Sub
    
    Function GetMaxColor(rng As Range) As Long
        Dim r As Range, n As Long, temp
        Application.Volatile
        For Each r In rng.Cells
            If (r.Font.ColorIndex <> xlAutomatic) * (r.Value <> "") Then
                If temp <> r.Font.Color Then
                    n = 1: temp = r.Font.Color
                    GetMaxColor = Application.Max(GetMaxColor, n)
                Else
                    n = n + 1
                    GetMaxColor = Application.Max(GetMaxColor, n)
                End If
            Else
                temp = 0
            End If
        Next
    End Function
    Dear Jindon;
    Your code is beautiful.
    No errors. Doing the correct procedure.
    Getting the desired results.

    But the code is not fully understood.
    Whether you like the following macro style.


    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For i = 2 To lEndRw
        For Each r In rMyRng.Rows(i).Cells
            If r.Font.ColorIndex = 3 Then
                lTemp = lTemp + 1
            Else
                If lTemp > lMax Then lMax = lTemp
                lTemp = 0
            End If
        Next r
        Cells(i, "B").Value = lMax
        lMax = 0
    Next i
    
    End Sub

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    @ pixel34,

    If jindon's code gets the desired result then please stick with it for fine tuning

    Because I don't want both of us (Me and Jindon) to spend much more time for this one unnecessarily. You may be enjoying the varieties but from my point of view your requirement is getting growing for each post of this thread when comparing to your initial thread

  16. #16
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    hi, jindon
    great code

    I wanted a little more detail would be?

  17. #17
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: What is the most number of consecutive colors.

    Quote Originally Posted by pixel34 View Post
    hi, jindon
    great code

    I wanted a little more detail would be?
    What part?

  18. #18
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Excuse me Sixthsense

    If the cell is empty, jump in your code should be

    Value <> "" Then

  19. #19
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Quote Originally Posted by pixel34 View Post
    Excuse me Sixthsense

    If the cell is empty, jump in your code should be

    Value <> "" Then

    did you see this message?

    Please compare your code with the code of jindon

  20. #20
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Oops... try try the below code for getting result for both Column-A (For Black Color Text) and Column-B (For Red Color Text)

    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range, x As Byte, sCol As String
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For x = 1 To 2
        sCol = "A": iColor = -4105 'For Black
        If x = 2 Then sCol = "B": iColor = 3 'For Black
        
        For i = 2 To lEndRw
            For Each r In rMyRng.Rows(i).Cells
                If r.Font.ColorIndex = iColor Then
                    lTemp = lTemp + 1
                Else
                    If lTemp > lMax Then lMax = lTemp
                    lTemp = 0
                End If
            Next r
            Cells(i, sCol).Value = lMax
            lTemp = 0
            lMax = 0
        Next i
    Next x
    
    End Sub

  21. #21
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Dear Sixthsense,

    I did the wrong test.
    The first summer of the year, even if the macros incorrect.

    if you don;
    E: K is red all data from
    value of "0" is doing.
    Yet the value "7" will be.

    It also handles empty cells will take.
    (Empty cells will be traded.)
    (Skip empty cells)


    This macro message: 11
    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For i = 2 To lEndRw
        For Each r In rMyRng.Rows(i).Cells
            If r.Font.ColorIndex = 3 Then
                lTemp = lTemp + 1
            Else
                If lTemp > lMax Then lMax = lTemp
                lTemp = 0
            End If
        Next r
        Cells(i, "B").Value = lMax
        lMax = 0
    Next i
    
    End Sub
    Last edited by pixel34; 12-16-2013 at 04:39 AM.

  22. #22
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Try this...

    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range, x As Byte, sCol As String
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For x = 1 To 2
        sCol = "A": iColor = -4105 'For Black
        If x = 2 Then sCol = "B": iColor = 3 'For Black
        
        For i = 2 To lEndRw
            For Each r In rMyRng.Rows(i).Cells
                If r.Value <> "" Then
                    If r.Font.ColorIndex = iColor Then
                        lTemp = lTemp + 1
                    Else
                        If lTemp > lMax Then lMax = lTemp
                        lTemp = 0
                    End If
                End If
            Next r
            Cells(i, sCol).Value = lMax
            lTemp = 0
            lMax = 0
        Next i
    Next x
    
    End Sub

  23. #23
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    I am sorry. Dear Sixthsense
    But still wrong.

    What's wrong? I showed in the example.
    Attached Files Attached Files

  24. #24
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: What is the most number of consecutive colors.

    What I understand is count the max consecutive font color except the cell with no value and font colorindex = default color.(xlAutomatic)

    So it will count consecutive any font color.

    Completely different in logic from the other code.

  25. #25
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Quote Originally Posted by jindon View Post
    What I understand is count the max consecutive font color except the cell with no value and font colorindex = default color.(xlAutomatic)

    So it will count consecutive any font color.

    Completely different in logic from the other code.
    Dear Jindon;
    I'm unable to use your code in other files.
    I'm afraid.
    Because the column, row and cell addresses unclear.
    I novice user.

  26. #26
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Dear Sixthsense

    It is a good alternative.
    Alternative to happen to?

  27. #27
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: What is the most number of consecutive colors.

    The code is specially designed to what you have uploaded.
    change
    With Range("e2:k9")
    to
    With Selection
    Then selection the cells to be calculated and run the code.
    However the selection should start from Col.D as least.

    If you run the code with the selection includes Col.A-C. it will give you the error.

    You know, I don't like to write a code with GUESS....

  28. #28
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    This is a great code.
    Dear Sixthsense
    I'm doing the following experiment.
    Last edited by pixel34; 12-16-2013 at 07:04 AM.

  29. #29
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Glad it helps you and thanks for the feedback

  30. #30
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    I'm really grateful to you.
    Dear Jindon.

    I think it's code @Sixthsense more valuable for me.
    Error correction of hope.

    Dear Sixthsense.
    You misunderstand me. I felt.
    I can not write in English.
    These articles are reaching you with google translate.
    If there is a mistake I'm sorry.

    I you, I'm waiting for answers to 21 numbers of the posts.
    If you do not answer, please'll be off topic.
    I can not use code Jindon.

  31. #31
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Try this final version of code...

    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range, x As Byte, sCol As String
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For x = 1 To 2
        sCol = "A": iColor = -4105 'For Black
        If x = 2 Then sCol = "B": iColor = 3 'For Black
        
        For i = 2 To lEndRw
            For Each r In rMyRng.Rows(i).Cells
                If r.Value <> "" Then
                    If r.Font.ColorIndex = iColor Then
                        lTemp = lTemp + 1
                    Else
                        lTemp = 0
                    End If
                Else
                    lTemp = 0
                End If
                If lTemp > lMax Then lMax = lTemp
            Next r
            Cells(i, sCol).Value = lMax
            lTemp = 0
            lMax = 0
        Next i
    Next x
    
    End Sub
    Refer the attached file for details. If it gets any wrong results then please highlight those rows with expected result
    Attached Files Attached Files

  32. #32
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Dear Sixthsense;

    21 of the posts I did try the example files in the attachment.
    12 lines A12 cell value "0" is not
    "1" should be. Because the data in this row are black.

    21 of the message with the attached excel
    please do the experiment.

  33. #33
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Please attach a file with code and highlight the wrong result with expected answer

  34. #34
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Example is ready.
    dear Sixthsense
    Attached Files Attached Files

  35. #35
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    Try this revised code...

    Sub GetMax()
    Dim iColor As Integer, lTemp As Long, lMax As Long, lEndRw As Long, i As Long
    Dim rMyRng As Range, r As Range, x As Byte, sCol As String
    
    lEndRw = Cells(Rows.Count, "E").End(xlUp).Row
    Set rMyRng = Range("E1:K" & lEndRw)
    
    For x = 1 To 2
        sCol = "A": iColor = 0 'For Black
        If x = 2 Then sCol = "B": iColor = 255 'For Black
        
        For i = 2 To lEndRw
            For Each r In rMyRng.Rows(i).Cells
                If r.Value <> "" Then
                    If r.Font.Color = iColor Then
                        lTemp = lTemp + 1
                    Else
                        lTemp = 0
                    End If
                Else
                    lTemp = 0
                End If
                If lTemp > lMax Then lMax = lTemp
            Next r
            Cells(i, sCol).Value = lMax
            lTemp = 0
            lMax = 0
        Next i
    Next x
    
    End Sub
    Refer the attached file for details
    Attached Files Attached Files

  36. #36
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    Yuuuuuuuuuppiiiiiiiiiiiiiiiiiiiii
    You're a great Sixthsense.

    Topic is solved.
    Please get marked.
    I can not.

  37. #37
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: What is the most number of consecutive colors.

    You're Welcome

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  38. #38
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: What is the most number of consecutive colors.

    I did it.
    Thank you again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Counts two consecutive number???
    By thangkhi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 01:07 PM
  2. [SOLVED] Filter by Consecutive Cell Values or Colors
    By thelegazy in forum Excel General
    Replies: 10
    Last Post: 07-26-2013, 12:20 PM
  3. Count number of consecutive cells
    By skullte in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-07-2013, 03:20 AM
  4. [SOLVED] How to get the number of times exactly 4 consecutive cells have a number greater than 6?
    By llane5150 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2013, 11:23 PM
  5. Difference between consecutive number
    By loudwallace in forum Excel General
    Replies: 6
    Last Post: 08-18-2010, 04:07 PM

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