I was wondering if anyone could help me out on the following problem.
If Cell "c1" has a value of say 2 in it. I want a macro that will then Randomly fill 2 of 3 cells (say cells "f1", "f3","f5") with a specified color.
Thanks in advance,
edizzi
I was wondering if anyone could help me out on the following problem.
If Cell "c1" has a value of say 2 in it. I want a macro that will then Randomly fill 2 of 3 cells (say cells "f1", "f3","f5") with a specified color.
Thanks in advance,
edizzi
Last edited by edizzi; 01-25-2013 at 01:46 PM.
Hello edizzi,
Welcome to the forum.
You could use conditional formatting for this.![]()
Please consider:
Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
Hello Winon,
Thanx for the quick reply.
I am not sure that conditional formatting will work. I have a macro running that updates the sheet every 60 seconds. What I want to happen is when c1 = 2 then cells "f1" and "f3" will be red and cell "f5" will be left blank, but when the other macro updates the sheet it will randomly reassign which 2 cells are red. So maybe then cells "f1" and "f5" are red and "f3" is blank. If you can understand what I am explaining lol.
Thanks again,
edizzi
Hello edizzi,
You could still use conditional formatting for this, while the Macro updates the Data on your Sheet, Conditional Formatting will respond accordingly.
Could you perhaps upload a sample WorkBook with your Code, if any, and I will show you how it is done!![]()
Last edited by Winon; 01-27-2013 at 04:54 AM. Reason: Corrected spelling
Hmmm now you have me intrigued Winon! I tried messing with conditional formatting to achieve my goal and could not quite get it to point I wanted. I am not sure how to upload a workbook on here. I am sure I am just overlooking it. When I get a little more time today I will figure out how to upload it and add it here. What I have done is use the Now()(cell a1) function with a Macro that updates the cell where the Now() function is located every minute. I then divide the time out in to hours and minutes (cells c1:f1). So you essentially have a clock once you kick the Macro off. Now if you can show me how to acheive the above with cell c1 the first 'hour' cell that would be awesome!Time xlforum.xlsm
Thanks,
edizzi
Hello edizzi,
in Post #3 you state:In your sample WorkBook, rows 3 to 5 are empty, which confuses me somewhat.What I want to happen is when c1 = 2 then cells "f1" and "f3" will be red and cell "f5" will be left blank, but when the other macro updates the sheet it will randomly reassign which 2 cells are red. So maybe then cells "f1" and "f5" are red and "f3" is blank.
I have applied examples of Conditional Formatting in the attached Sample WorkBook, for Cells C1 and F1, maybe you could use that to set it up the way you actually want it.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks