My formula is unnecessarily copied to the adjacent cell when entering data into another cell

MrsGrayMarlin

New Member
Joined
Sep 16, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I am a payroll professional. I use an Excel spreadsheet to track regular/PTO/holiday, etc., hours to compare to our payroll processing software totals. I am using Microsoft® Excel® for Microsoft 365 MSO (Version 2408 Build 16.0.17928.20114) 64-bit

For each employee, their line contains their regular bi-weekly hours (usually 80) in column L. Columns M, and N are titled "Hourly" and "Salary," respectively, depending on the employee's classification. Columns M or N contain the formula "=L69-O69-R69-S69-T69-U69-V69-W69-AA69-AF69-AG69” where “L” is their regular hours and all other columns represent Unpaid Time off (O), PTO Week 1 (R), PTO Week 2 (S), Holiday Week 1 (T), Holiday Week 2 (U), Floating Holiday Week 1 (V), Floating Holiday Week 2 (W), Jury Duty (AA), Bereavement Week 1 (AF), Bereavement Week 2 (AG).

I have a master template sheet at the beginning of the workbook. For each two-week pay period, I copy the template using right-click, move, or copy to a new sheet and name it with the pay period's dates. This issue occurs whether I follow that process or if I copy all data and paste it to a new worksheet.

When entering holiday or PTO hours into columns T or U, the formula in column M or N (again, depending on the employee classification) gets copied to the cell, which does not contain the data in column M or N. For example, if employee A occupies row 45, and is an hourly employee, their formula will reside in cell M45. Once I enter 8 hours to column T to indicate 8 hours of holiday pay, the formula will copy to cell N45. That means I have data in M45 and N45, which throws off my column totals.

Does anyone know why this might be happening? Please let me know if you need screenshots or any other information to assist me.

Thank you!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
It would be nice if you could provide a small example of your table. As it is and how you would like the result to look like.
 
Upvote 0
Unfortunately, my company computer will not allow me to download the XL2BB Add-In so this is the best I can do. The names in the table are fictitious. The table starts in cell A1. In this example, when entering data in columns P or Q (PTO Week 1/PTO Week 2), the formula in Column K (Hourly) is copied to Column L. This is the undesired action. When entering data in any cell, it should not copy to another cell when there is not a formula.
Thanks for your help!
EmployeeStaff Type/DeptUKG EE IDNumber of Work DaysNumber of Hours / DayDaily Points for PTO (Quota)Work day scheduleHourly/SalaryBranchRegular Hours (For Calc Only)HourlySalaryUnpaid1099OTPTO - Week 1 (hrs)PTO - Week 2 (hrs)Total Hours - UKG
Adam CherryLPN419588HourlyNH
80.00​
80.00​
80.00​
Ahmed BlackburnOT201586SalaryRH
80.00​
80.00​
80.00​
Amari GonzalesRN3084108.75Mon-Thu (40 hr)SalaryRH
80.00​
80.00​
80.00​
Ayaan MilesRN227487Tue-Fri (32 hr)SalaryNH
64.00​
64.00​
64.00​
Caitlyn GibbsPT137586SalaryNH
80.00​
80.00​
80.00​
Destinee SweeneyRN - Admissions355487Mon,Tue,Wed,Fri (32 hr)SalaryRH
64.00​
64.00​
64.00​
Eleanor LawrencePT298586SalaryNH
80.00​
80.00​
80.00​
Giselle HeathPT45585SalaryRH
80.00​
80.00​
80.00​
Howard MannPT206586Tue-Fri (40 hr)SalaryNH
80.00​
80.00​
80.00​
Jair BooneLPN374588HourlyRH
80.00​
80.00​
80.00​
Jaylah DodsonRN354587SalaryRH
80.00​
80.00​
80.00​
Jazmyn ZamoraPT274586SalaryNH
80.00​
80.00​
80.00​
Joslyn BlanchardRN396587SalaryRH
80.00​
80.00​
80.00​
Karlee BurtonRN205586.4Mon-Thu (40 hr)SalaryNH
80.00​
80.00​
80.00​
Kathy RhodesRN243587SalaryNH
80.00​
80.00​
80.00​
Kevin VargasRN373585SalaryNH
80.00​
80.00​
80.00​
Lillian RandallOT406586SalaryRH
80.00​
80.00​
80.00​
Lydia HamiltonOT2084107.5Mon-Thu (40hr)SalaryNH
80.00​
80.00​
80.00​
Sergio YangPT165386Mon,Tue,Thu (24 hr)HourlyRH
48.00​
48.00​
48.00​
Viviana KaneOT299586SalaryNH
80.00​
80.00​
80.00​
 
Last edited by a moderator:
Upvote 0
Without the workbook, it's a bit of guesswork. I'd suspect it's a table column autofilling, or flash fill. Why don't you just put the formula in both columns on each row, but have it check the Hourly/Salary column before calculating. So it would be something like:
=IF(H2="Hourly", your formula, 0)
and in the next column:
=IF(H2="Salary", your formula,0)
 
Upvote 0
Without the workbook, it's a bit of guesswork. I'd suspect it's a table column autofilling, or flash fill. Why don't you just put the formula in both columns on each row, but have it check the Hourly/Salary column before calculating. So it would be something like:
=IF(H2="Hourly", your formula, 0)
and in the next column:
=IF(H2="Salary", your formula,0)
Hello,
I was able to transfer the file to my personal computer, download the software, and upload it from there. Please see below and advise if your solution suggestion remains the same. Thank you in advance for your time!
Payroll Sample.xlsx
ABCDEFGHIJKLMNOPQAF
1EmployeeStaff Type/DeptUKG EE IDNumber of Work DaysNumber of Hours / DayDaily Points for PTO (Quota)Work day scheduleHourly/SalaryBranchRegular Hours (For Calc Only)HourlySalaryUnpaid1099OTPTO - Week 1 (hrs)PTO - Week 2 (hrs)Total Hours - UKG
2Adam CherryLPN419588HourlyNH80.0080.0080.00
3Ahmed BlackburnOT201586SalaryRH80.0080.0080.00
4Amari GonzalesRN3084108.75Mon-Thu (40 hr)SalaryRH80.0080.0080.00
5Ayaan MilesRN227487Tue-Fri (32 hr)SalaryNH64.0064.0064.00
6Caitlyn GibbsPT137586SalaryNH80.0080.0080.00
7Destinee SweeneyRN - Admissions355487Mon,Tue,Wed,Fri (32 hr)SalaryRH64.0064.0064.00
8Eleanor LawrencePT298586SalaryNH80.0080.0080.00
9Giselle HeathPT45585SalaryRH80.0080.0080.00
10Howard MannPT206586Tue-Fri (40 hr)SalaryNH80.0080.0080.00
11Jair BooneLPN374588HourlyRH80.0080.0080.00
12Jaylah DodsonRN354587SalaryRH80.0080.0080.00
13Jazmyn ZamoraPT274586SalaryNH80.0080.0080.00
14Joslyn BlanchardRN396587SalaryRH80.0080.0080.00
15Karlee BurtonRN205586.4Mon-Thu (40 hr)SalaryNH80.0080.0080.00
16Kathy RhodesRN243587SalaryNH80.0080.0080.00
17Kevin VargasRN 373585SalaryNH80.0080.0080.00
18Lillian RandallOT406586SalaryRH80.0080.0080.00
19Lydia HamiltonOT2084107.5Mon-Thu (40hr)SalaryNH80.0080.0080.00
20Sergio YangPT165386Mon,Tue,Thu (24 hr)HourlyRH48.0048.0048.00
21Viviana KaneOT299586SalaryNH80.0080.0080.00
Sheet1
Cell Formulas
RangeFormula
K2,K20,K11K2=J2-M2-P2-Q2-R2-S2-T2-U2-Y2-AD2-AE2
L3:L10,L21,L12:L19L3=J3-M3-P3-Q3-R3-S3-T3-U3-Y3-AD3-AE3
H2:H21H2=IF(K2>=1,"Hourly","Salary")
AF2,AF11,AF20AF2=SUM(K2:AE2)
AF3:AF10,AF12:AF19,AF21AF3=SUM(L3:AE3)
 
Upvote 0

Forum statistics

Threads
1,221,444
Messages
6,159,912
Members
451,601
Latest member
terrynelson55

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