+ Reply to Thread
Results 1 to 24 of 24

Changing Text Changes Color and Counting Based On Color

  1. #1
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Changing Text Changes Color and Counting Based On Color

    Changing Text Changes Color and Counting Based On Color
    I am a novice and still learning VBA.

    I am herewith enclosing excel sheet containing data.
    from Column A to M. except that D column is left blank for later entering data
    into that column. I need VBA code and the following are my requirements.

    1. If I Use the Keyboard shortcut Ctrl + Y it should insert in the current cell in Column A "Done" and Bold it and then it has to fill in the Yellow as Background color; also while it does this at the same time, I want from the Column B to Column I to be filled with Background color Yellow.

    In the same way above for the Keyboard shortcut Ctrl + G it should insert in the current cell in Column A "My Desk" and Bold it and then it has to fill in the Green as Background color; also while it does this at the same time, I want from the Column B to Column I to be filled with Background color Green.
    2. In a similar way as above, I need for the other contents in Column A (which you can view in the excel sheet enclosed) there are other status named viz… Print Ready, Priority Sent, Searched with each referenced to the colors that is filled in the excel sheet and with each being given a Keyboard shortcut assigned like above (and I leave those keyboard shortcuts to your choice).

    3. The complex part begins. I have already data collected in Column J beginning at J13 named as Client and below that are the names of clients that are multiple/occurrences which are extracted from Column B named as Client and in the next Column K from K14 the multiple/occurrences counts of the clients are calculated already and is displayed (please see my excel sheet).

    In Column L beginning at L10 and below is a list of Date Sent that are
    multiple/occurences extracted from Column E named as Date Sent and in the next
    Column M from M11 the multiple/occurences counts of Date Sent are calculated already and is displayed (Please see my excel sheet).

    Now my requirement is that I want to use the functions IF and AND Then Else
    etc....in VBA to do the following.

    1. IF Column A = "Done" AND Column B = yellow background color AND Column B
    MATCHES with Column J14 Then Column O14 minus 1 from Column K14.
    For example;
    A2 shows Done. So by using the coloring method which I requested above in question 1, the Column B to I will change to yellow. As Column B's background color is yellow now and the contents of B2 is Aaron Bee and if these two criterias match with J14 which has Aaron Bee, Then this formula should minus 1 transaction displayed in O14 and do the same for the other clients upto the last row wherever it ends as the data will vary sometimes.
    4. Can I have the above rule applied for the Date Sent counts minus 1 displayed at Column
    P11 onwards until last row wherever it ends as the data will vary sometimes.
    I do not know if my explanation is clear to you, but I have tried my best to explain. I appreciate any queries though from you; please excuse me if I have gotten things wrong. Please raise any queries which I am unaware of. I want this to be done only in VBA and conditional formatting is a tedious job to copy and paste. Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    Solution with userform

    call userform by Ctrl Shift Y or by dubbelclick


    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Leo Thank you so much..... you have created this form beautifully than I expected using forms........and you have solved my first 2 questions. Thank you once again.........hope you are working out on my other questions..thanks a tonne in advance.... you have saved me all the manual work I used to do.... God bless you....thank you thank you....i am so elated by what you have given me.......

  4. #4
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Thank you Leo... i forgot to mention... that you have given me two options as well double click as well as Ctrl Shift Y .....this is excellentttttttttttttttttt ...... I just want to hug you brother.....God bless you.....

  5. #5
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Just one problem I have brother Leo...when I tried to copy this code to the official workbook which already have macros, but they are not working out in those sheets. How do I go about this....?? I am not so good in VBA commands though....I tried copying from your sheet1 the private code as well created a user form and copied your commands there.....and its not working there..it just pops up the user form though and when i try to click on them nothing seems to happen...and Ctrl Shift Y too doesnt work in this workbook I copied to.....please help me out on this..

  6. #6
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    Part of userform is hidden, you can see complete in this


    Kind regards
    Leo
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    ok...will try this now..thank you bro..

  8. #8
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Yes, its working bro......just let me know that those 2 blank boxes one fills the black color ..and what does the 1st blank box do??? coz i tried and could not make of it......

  9. #9
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    1 textbox for the color, 1 textbox for the value for column A

    Kind regards
    Leo

  10. #10
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Fine thanks a tonne for explaining to me with so much patience... really appreciate you.....thanks a tonne..... ... well let me know once you have worked on my other queries as you have solve one part of my query......greatly appreciable...of all your efforts and time you have spent on this......you guys really rockstars of this site....))

  11. #11
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    in file provided by me all queries are done


    Kind regards
    Leo

  12. #12
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Oh is it..... well....just check......today on live data...thanks once again.....bro...leo

  13. #13
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Bro leo....the Client part works with color being yellow it reduces 1 from each...client......but the Date Sent part (M11 and M12 with total at M13) remains static and does not reduce with -1 for each yellow background already filled in Column E (Date Sent)....my query 4 is not working....can you kindly check please....and let me know... thank you...

  14. #14
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    hi....Bro leo....the Client part works with color being yellow it reduces 1 from each...client.....at Column K, and can I have this deducted data in the Column O....instead of K......how....help me on this please and also .....the Date Sent part (M11 and M12 with total at M13) remains static and does not reduce with -1 for each yellow background already filled in Column E (Date Sent)....my query 4 is not working for this....can you kindly check please....and let me know... thank you...

  15. #15
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    hi...bro Lee...still working on the Date Sent is it....

  16. #16
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    For M11
    Please Login or Register  to view this content.
    For M12
    Please Login or Register  to view this content.
    Kind regards
    Leo

  17. #17
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    Or

    for M11
    Please Login or Register  to view this content.
    for M12
    Please Login or Register  to view this content.
    Cheers
    Leo

  18. #18
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    thanks bro Leo..since I dont know where to place this, can you please copy this to the excel sheet you created and send it to me....kind request please....thank you once again for all the trouble you took to bring this out excellently.....i really commend your work... cause you made life so easy for the daily routine....

  19. #19
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    to place in Cell M11 and Cell M12


    cheers
    Leo

  20. #20
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    hi....bro...thank you so much....well that works fine for the two rows.....if sometimes this Date Sent data will be more and it will extend beyond this two....how i am supposed to include this in macro i dont know....can u include this part in your final sheet and send it over to me.....thanks for all the trouble you have taken......kind of you.......

  21. #21
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    hi....bro..leo....thank you so much....well i figured it out somehow how to place them... but I have one last request....for you to make one change.....for the user form you had created, can I have key board shortcuts for My Desk as Alt M. Alt D for Done. Alt P for Priority Sent. Alt S for Searched. Alt N for Print Ready as the users are feeling keyboard shortcuts are faster than using mouse. Just can you make this final change in that sheet with all the rest and send me the final one. Thanks ...hope i am not troubling you a lot......I know you will be able to nail this down....thanks in advance.. God bless your work...

  22. #22
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    hi....bro..leo....any updates done.....thank you so much....well i figured it out somehow how to place them... but I have one last request....for you to make one change.....for the user form you had created, can I have key board shortcuts for My Desk as Alt M. Alt D for Done. Alt P for Priority Sent. Alt S for Searched. Alt N for Print Ready as the users are feeling keyboard shortcuts are faster than using mouse. Just can you make this final change in that sheet with all the rest and send me the final one. Thanks ...hope i am not troubling you a lot......I know you will be able to nail this down....thanks in advance.. God bless your work...

  23. #23
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Changing Text Changes Color and Counting Based On Color

    With DubbelClick in wright Column, you change status
    and formulas for the client and dates list

    shortcuts is not my peace of cake

    Kind regards
    Leo
    Attached Files Attached Files

  24. #24
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: Changing Text Changes Color and Counting Based On Color

    Wow...Bro Leo...thank you this is enough I think...and you have nailed it ............God bless you..... thank you for all the trouble you had taken.
    You are superfastttttttt......in cracking.......Next time, any queries I have.....i will surely come in to this site....thanks for your kind help...no words to
    express my happiness and gratitude to you and the forum....God bless you all.....I will close this as solved...today....

+ 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] Changing Text Changes Color and Counting Based On Color
    By Quivolt in forum Excel General
    Replies: 3
    Last Post: 06-03-2017, 12:36 PM
  2. Changing text color of cell based on character
    By -Fate- in forum Excel General
    Replies: 8
    Last Post: 06-02-2010, 03:37 PM
  3. Changing text color based on a limit within the cell
    By jessetrunk in forum Excel General
    Replies: 1
    Last Post: 02-02-2010, 09:49 AM
  4. macro: changing color of coloumn header based on rows color
    By rajaid in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2009, 06:43 PM
  5. changing text color based on date
    By misty0705 in forum Excel General
    Replies: 2
    Last Post: 04-27-2007, 03:29 PM
  6. Changing Color of text based on a number
    By Yerfdog78 in forum Excel General
    Replies: 4
    Last Post: 02-20-2007, 03:34 AM
  7. Changing row tex color based on text during copy
    By mdpx2005 in forum Excel General
    Replies: 1
    Last Post: 01-28-2005, 01:43 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