Importing data to generate email

mattmcclements

New Member
Joined
Apr 15, 2022
Messages
36
Office Version
  1. 2016
Platform
  1. Windows
Hi everyone,

When the offence column is >=3 it should generate an email which is all working, however, the spreadsheet works from importing the employee name, time clocked in and date from another database. The rest of the spreadsheet is then filled out with Vlookup and IF commands. However, the email isn't generating when the information is imported, it will only fill out when the offence number is manually inputted.

Any help would be greatly appreciated!


Lates Tracker.xlsm
ABCDEFHIJK
1Employee Personnel NumberDateClock inStart timeMinutes lateShiftResponsibleOffence No.Action
2#N/A#N/A#N/A#N/A#N/A0#N/A
3#N/A#N/A#N/A#N/A#N/A0#N/A
4#N/A#N/A#N/A#N/A#N/A0#N/A
5#N/A#N/A#N/A#N/A#N/A0#N/A
6#N/A#N/A#N/A#N/A#N/A0#N/A
7#N/A#N/A#N/A#N/A#N/A0#N/A
Lates
Cell Formulas
RangeFormula
E2:E7E2=VLOOKUP(B2,Master!$C$2:$I$1008,7,FALSE)
F2:F7F2=IF(D2>E2,D2-E2,"NOT LATE")
H2:H7H2=INDEX(Master!$D$2:$D$1332,MATCH(B2,Master!$C$2:C1007,0))
I2:I7I2=IF(H2=$N$2,"Joe Westwell",IF(H2=$N$3,"Aaron Johnson",IF(H2=$N$5,"Gareth Roberts",IF(H2=$N$6,"Steven Jones",IF(H2=$N$4,"Lee Massey",IF(H2=$N$7,"Malcolm Wright",IF(H2=$N$9,"Craig Jones",IF(H2=$N$8,"Lukasz Pawlik",IF(H2=$N$10,"Mike Moffatt",IF(H2=$N$11,"MANAGER",IF(H2=$N$12,"Gary Lee",IF(H2=$N$13,"Gary Lee",IF(H2=$N$14,"Mark Wright")))))))))))))
J2:J7J2=COUNTIFS($B$2:B2,B2,$G$2:G2,"LATE")
K2:K7K2=IF(G2=$R$1,"NOT LATE",IF(J2>=3,"Investigate",IF(J2=2,"1 Away",IF(J2=1,"First one"))))
A2:A7A2=INDEX(Master!$F$2:$F$1332,MATCH(B2,Master!$C$2:C1007,0))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:F3394Cell Valuebetween 0.0631944444444444 and 0.999988425925926textNO
F2:F3394Cell Value<=0.0625textNO
F2:F3394Cell Valuecontains "NOT LATE"textNO
J2:J3394Cell Value=0textNO
K2:K3394Cell Valuecontains "NOT LATE"textNO
J2:J3394Cell Valuecontains "NOT LATE"textNO
I2:I3394Cell Valuecontains "MANAGER"textNO
H2:H3394Cell Valuecontains "NA"textNO
K2:K3394Expression=K2="First one"textNO
J2:J3394Cell Value=1textNO
K2:K3394Expression=K2="1 Away"textNO
J2:J3394Cell Value=2textNO
K2:K3394Expression=K2="Investigate"textNO
C2:C1130,A2:A3394,J2:J3394Cell Valuebetween 3 and 1000textNO
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top