+ Reply to Thread
Results 1 to 5 of 5

Vba macro code for differentiation using colors

  1. #1
    Forum Contributor
    Join Date
    07-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    106

    Vba macro code for differentiation using colors

    Hello every one!!!

    I need macros in such a way that, to differentiate between different set of dates with some color.

    even for the headings in different color to identify in between.

    I have done manually in the attached excel sheet for your kind reference and easy understanding.

    thank you...

    Regards,
    Dharani.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Vba macro code for differentiation using colors

    Here is CF for left set of data

    (if dates always alternate, odd/even)

    Like this:
    1.1.
    2.1
    3.1.
    4.1.

    Not like this:
    1.1.
    3.1.
    4.1.
    6.1.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Vba macro code for differentiation using colors

    Quote Originally Posted by zbor View Post
    Here is CF for left set of data

    (if dates always alternate, odd/even)

    Not like this:
    1.1.
    3.1.
    4.1.
    6.1.

    wow. this is simple and best method... thanks a lot.... great...

    but when i apply like =MOD(B2,2) it is giving the output as 01/00/1900
    then if i copy and paste your cell in my cells then it is giving as 0's and 1's but if i directly write =mod(b2, 2), it is giving as 01/00/1900 rather giving as 0 and 1.
    (even in your attached file, the first cell is like this only)
    what shall i do???

    Thank you...

    Regards,
    Dharani.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Vba macro code for differentiation using colors

    Format it as general not as date (that excel will do automatically in this case).

    Oh, sorry, now I see what yo uasking for.
    Delete that column. Don't need it. It was just for test.

  5. #5
    Forum Contributor
    Join Date
    07-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Vba macro code for differentiation using colors

    Quote Originally Posted by zbor View Post
    format it as general not as date (that excel will do automatically in this case).

    Oh, sorry, now i see what yo uasking for.
    Delete that column. Don't need it. It was just for test.
    thank you so much for spending your valuable time in helping me...
    Thanks a lot...

    With kind regards,
    dharani.

+ 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. Change all colors of a type with one code
    By rybussell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2014, 02:32 AM
  2. Changing Tab Colors Via Code (Type Mismatch)
    By Warderbrad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-20-2012, 09:56 PM
  3. Converting cell colors to hex code
    By DimlerJ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2007, 01:59 PM
  4. Print VBA code in Editor format colors
    By Sarah Jane in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-15-2005, 12:05 PM
  5. [SOLVED] VBA code to count colors/shapes?
    By Nimrod in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-08-2005, 01:06 AM

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