+ Reply to Thread
Results 1 to 14 of 14

Select cell that match from other sheet

  1. #1
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Select cell that match from other sheet

    I'm learning VBA and I want to create a ProjectUpdate for the Council.
    I have long list in Column A in 'Summary' sheet and project update in 'George' sheet where they choose the project names in drop down list box.
    Now, what codes will I put in, that whatever the name of the project they choose in list box, it will automatically activate the cell in Column A in 'Summary' sheet?

    This is the code I've put in where they click on one of the color circle in 'George' sheet that represent the time of budget like red is alert, yellow is ok & green is good.

    Please Login or Register  to view this content.
    But at the moment, I just want to know how to activate the cell in 'Summary' sheet that match the list box in A4 cell in 'George' street so the color can automatically be filled in the cell next to the matched name in 'Summary' sheet

    This is 'George' sheet
    Project.jpg

    and this is the 'Summary' sheet where the color will automatically filled in next to matched project whenever they click on buttons in 'George' sheet
    Project2.jpg

    Please ask any questions if you want more information. I'm doing my best to explain the situation, Thank you

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Is there a unique key that will match up the selection made in George, with the items in Summary?


    rylo

  3. #3
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    thank you for replying rylo, I'm not so sure what you mean by unique key but all the project names in 'Summary' sheet are exactly the same as in drop down list box in 'George' sheet.

    By the way, the color can be filled in 'Summary' sheet whenever the person clicks on the color circle in Time & Budget in 'George' sheet
    Last edited by unley; 11-27-2008 at 09:34 PM.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    so where are the project names in Summary? From the picture, it looks as though the number is in column A, with the address in column B.

    How about putting up a couple of small workbooks that match your structure, aims etc. Much easier for us to work with than pictures.



    rylo

  5. #5
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    ProjectUpdateGeorget.xls

    I hope the attachment is working because there's a red cross on the sign while uploading.
    I wrote out the details in text box to explain in the attachment. Thank you in advance

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    See if this gives you some ideas....

    Please Login or Register  to view this content.
    rylo

  7. #7
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    Absolutely brilliant, thank you very much for this. Now, I have to add codes for every object (color circle) and that will take alot of time.

    So rylo, how did you enter those codes. Did you use Record Macro, or did you just put in the codes from your head?
    Like typing in
    Please Login or Register  to view this content.
    what does Range("A:A") sound for? I know there's A1 or AA1

    So thank you very much again, this forum is the best.

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Here's another approach. Put each of the relevant calling codes to the button (eg TimeRed is allocated to Oval 123). I can't see why you have to blank out the buttons - what happens if you make a mistake and want to correct it???

    Please Login or Register  to view this content.
    rylo

  9. #9
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    That's a good question but that's the way how my boss wanted it. He want to be able to see the result with "Project Update" where he can type in the details in the text box otherwise he'll have to change over to 'Summary' sheet to see the result from colors.

    In the 'Summary' sheet, there will be 3 to 10 sections for one project each where each monthly report can be seen.

    Also there will be at least 10 sections of those in 'George' sheet (with list boxes) because of monthly reports and that goes the same to other project sheets as well.

    Yes, I know it's a lot of work but it's the best way to keep them happy.

    So thank you again for such another good approach. Much appreciated mate.

  10. #10
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    I have tested your last code and it is so much more convenience, thank you. But it there any way the unchosen color circles for Time & Budget become blank? Like I made in the first post?
    The reason is because my boss normally print the reports with details and it must show the color with Time and Budget.
    Hope this make sense, Thanks.

  11. #11
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    by the way, I can see you have blank the color with unchosen circles for 'Time' and 'Budget' in the code
    Please Login or Register  to view this content.
    but it did'nt work

    is there any way to manipulate this code so the unchosen circles become blank?

    Thanks

  12. #12
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253
    I have worked out and I hope this will help others who wants their objects blank as the unchosen ones

    Please Login or Register  to view this content.
    But the only trouble is that it worked the first time but when I replaced the color shapes back that disappeared and renamed the replaced shapes with proper names that match the macros, the unchosen ones did'nt disappear again like the first time when I clicked on the circle, it only filled color in 'Summary' sheet. Any suggestion?
    Like what Rylo said, what happen if they made a mistake? How will I replace the unchosen ones that disappeared and make them work again? Even I named the objects that matched the macros.?

    Update: I've just found out that I have to rename the shapes with different names, not as the same in the first time
    like it use to call Green1 but now change to different name to make it work
    Last edited by unley; 11-30-2008 at 08:10 AM.

  13. #13
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Can't see why you have to rename them??? You should be able to just make them all visible. Create a macro that will go through them all and make them visible....

    rylo

  14. #14
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    (Solved)

    Yes I did just that but unfortunetly, they did'nt disappear. I made them visible again with the same name but it on created colors on the Summary page.

    So thank you very much for this Rylo

    (SOLVED)
    Last edited by unley; 12-02-2008 at 10:11 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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