Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

VBA 2016 Excel - Employee exceed working days

rhonrsv

Apprentice
Advanced Member
Messages
97
Reaction score
1
Points
26
May list of names (emplyees), at ang codition po ay dapat 5 working days lang sila at 2 restdays or day off. paano po ba sa VBA ang ganun?
Balak ko po sana na may command button sa sheet at pag click dun ay babasahin nya per employee kung may nag exceed ba sa 5 working
days na allowed. Paano po? Salamat :dance::happy::salute::thumbsup::help:;) see attached photo po para sa reference, yung unang employee po ay
exceeded na po, paano po codes or paraan para po ito ay ma detect ng system???


View attachment 309546
File attached!
 

Attachments

  • EWork.JPG
    EWork.JPG
    99.4 KB · Views: 33
  • EWork.JPG
    EWork.JPG
    104.4 KB · Views: 48
Hindi ko alam kung ano ung meaning nung mga letters sa loob ng mga cells (except RD = restday), may A, A4 yata or C4 pa... If you could provide legend for each of the letters present, mas maganda sana.

Anyway, based jan sa table na binigay mo, naka-set naman nga ung mga days (and dates) of the week, so wala na pproblemahin sa day count. Fixed na 7 ang count nyan, since iba iba yung mga content (letters) na laman yung mga cells, mahirap gamitin yun to count the number of days na pumasok sya, so yung RD ang gagamitin to count the restdays, then subtract it to the number of days per week (7). So para makuha yun, gamitin natin example yung Jan-1 to Jan-7 mo

Let's assume na yung Jan-1 Column na katapat nung 1st Row ng employee ay D4, yung Jan-7 ay J4, then yung cell na magho-hold ng counter natin ay K4.
Ang formula na ilalagay mo sa K4 Cell ay:
Code:
=(7 - COUNTIF(D4:J4,"RD"))

Explanation:
7 - fixed number of days
countif - function para magcount ng number of instances na na-meet yung condition, syntax: COUNTIF(range, condition)
D4:J4 - range, from cell D4 to cell J4
"RD" - condition, absolute text value na RD
COUNTIF(D4:J4,"RD") - bilangin daw yung number of instances na makikita yung value na RD sa cells D4 hanggang J4, sa case nito, 1 lang ung RD
=(7 - COUNTIF(D4:J4,"RD")) - (7 - 1) = 6, 6 working days for employee 1 dun sa 1st week of Jan
 
Last edited:
hello sir @rhonrsv ,
need nyu po ba na Payroll and TimeKeeping System for business?
just PM me, I can offer you my project here :)
 
View attachment 309663

yung unang pic yan po yung itsura ng file, bale select muna sa button kung anong task, then click command button... dapat mag wawarning sya kung may employee na nag exceed sa 5 working days and 2 RD rules...

eto pa po mga pic

View attachment 309664

yung A/A4C/C4 number of hours po yun na ipinasok

A - 8hours Dayshift
A4 - 8 hours Plus 4 hours OT Dayshift

C/C4 naman nightshift

View attachment 309665

gumawa din po ako ng "IF "formula na bibilangin ang RD, gusto ko lang sana na mag wawarning sya pag exceed Thank you
VBA
 

Attachments

  • CapPhoto.png
    CapPhoto.png
    316.6 KB · Views: 64
  • AS.JPG
    AS.JPG
    412.5 KB · Views: 38
  • sdasd.JPG
    sdasd.JPG
    121.2 KB · Views: 12
Ok na po ang project ko salamat po
 
Back
Top Bottom