How Would i make a range of a Intersect Statement be a color instead of columns.
Kinda like this but functional....
Please Login or Register to view this content.
How Would i make a range of a Intersect Statement be a color instead of columns.
Kinda like this but functional....
Please Login or Register to view this content.
Hi Codeman,
You can test each cell in the Target Range:
Please Login or Register to view this content.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
OK so how would i change this function from making the range a column to a Color
Please Login or Register to view this content.
If I understand what you're doing then Maybe:
Please Login or Register to view this content.
Last edited by xladept; 05-29-2013 at 03:37 PM.
It didnt work. So Basically i have a Time Entry Sheet that we will have filled out. I am trying to make it easier when entering time and that is why this code takes out the need of a colon. The problem is that the Entry Spots are not all linear and so i figured defining the range by color instead of column would work out better.
What i want the code to do is If the Cell color is "yellow" than it does the time format otherwise excel does its normal thing.
Hi Codeman,
I always edit after posting - try it now - it's tested and working for me - sorry!
Its Works!!!! Thanks!
While i have you hear how could you make it so that if i type say just 12 it would convert to 12:00 instead of 12:12.
I'll get back to you on that.
Last edited by xladept; 05-29-2013 at 04:09 PM.
It Just comes back as 12:00 now no matter what.
Hi Codeman,
I couldn't make the Time functions work with any regularity. See if this works for you:
Please Login or Register to view this content.
I Put your code in and it just made the number some long date. So i assume it doesn't work. The Single Digit part isnt very important i was just wondering if there was something simple that could be changed to make it work.
Hi Codeman,
What are you entering? It worked for me:
when I entered 12 - I got 12:00 PM
when I entered 13 - I got 1:00 PM etc???
Never mind it is working now but when i put in something like 230 it gives me the long date
Last edited by Codeman553; 05-30-2013 at 11:59 AM.
Do you want code to handle an entry like 230??
Ya because when we input time into it generally 99.9% of the time it will be formatted like this #:00, #:15, #:30, #:45 AM/PM. I just figured if it would be quicker if it could handle putting in a single 2 to mean 2:00 instead of 12:02
Do you run more than one shift? Is an entry of 730 7:30 AM and an entry of 1:15 1:15 PM? What are the criteria for the entries - will 2:30 PM be entered as 1430???
How shall we change this?
Please Login or Register to view this content.
Last edited by xladept; 05-31-2013 at 07:01 PM.
Yes the guys clock in multiple times a day. Up to 10 clock in and clock outs in one day.
I need it to handle entering PM or P for PM. right now if i put 5p or 5pm it does 5p: than errors.
Hi Codeman,
Here's the next version
Please Login or Register to view this content.
Last edited by xladept; 06-03-2013 at 08:57 PM.
Works Wonderfully! I really appreciate all your help. Just started in the VBA area. I come from C# and Java background. Thanks again man!!!!
Edit:
Did find one bug when i type something with "AM" i get 23:0m AM.
Last edited by Codeman553; 06-04-2013 at 10:06 AM.
Hi Codeman,
Just one bug? I'll check that out - I want to take the processing out of the range anyway - anon!
Ya as far as i have seen thats it. Thanks!
Hi Codeman,
I think I fixed that bug and I put the processing in core where it belongs it's not as pretty as I'd like but it may work now. C# and Java huh? I guess it's a different mindset???
Please Login or Register to view this content.
OK ill take a look. Ya i understand the most of the global syntax that most language shared its just trying to learn specific syntax of vba that i am struggling. Been out of the game for a while now.
Hi Codeman,
Replace(!) the last routine with this:
Please Login or Register to view this content.
Haha i remember those days when although something works you find it atrocious to look at so its time to clean it up. Just replaced it works great.
Hi Codeman,
Those days never die - they just fade away
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks