Calculate increments

Priyantha
StarLounger
Posts: 86
Joined: 10 Oct 2022, 02:52

Calculate increments

Post by Priyantha »

Dear All,

I use an excel worksheet to calculate employees' annual increments (with small macros). there are three worksheets as follows.
- My increment Format is in "Format" sheet
- Output data is in "Datashet" sheet
- Employee details are in "DataBase" (Paid Salary, Paid overtime amount, Paid Holiday pay amount, etc..) for employees each month.

I enter the data manually for some Cells ("Format" Sheet) and try to get the data ‌from the "DataBase" sheet using a macro.

Cells in "Format" Sheet :

* For "K35" cell - Paid Holiday pay Amount: According to "F4" Cell Value (P.F. No.), I hope to get a sum of data from Sheet - "DataBase", Colum "G"
(Holiday pay), if the Increment date in "F6" cell (Date of Increment) is 1-15 then Range: From, (month in "F6" cell (Date of Increment) + 2 months)
to the month in the "C15" cell (To Date), if not the Increment date in "F6" cell (Date of Increment) is 16-31 then Range: From, (month in "F6" cell
(Date of Increment) + 3 months) to the month in the "C15" cell (To Date).

Eg. PF No. 15850 ("F4" Cell ) Mr.E.D.J.C. Karunasena, if his increment date is 2022-07-10 ("F6" cell) & increment should calculate up to 2022-11-30
("C15" cell). For his holiday pay arrears, I want to get sum of paid holiday pay amount from 2022-September to 2022-November from "DataBase"
sheet - Colum "G" value. if his increment date is 2022-07-20 ("F6" cell) I want to get sum of paid holiday pay amount from 2022-October to 2022-
November

* For "K39" cell - Paid Overtime Amount: According to "F4" Cell Value (P.F. No.), I hope to get a sum of data from "DataBase" sheet - Colum "F"
(Overtime), if the Increment date in "F6" cell (Date of Increment) is 1-15 then Range: From, (the Increment date in "F6" cell (Date of Increment)
+ 2 months) to month in the "C15" cell (To Date). if not the Increment date in "F6" cell (Date of Increment) is 16-31 then Range: From, (the
Increment date in "F6" cell (Date of Increment) + 3 months) to the month in the "C15" cell (To Date).

Eg. PF No. 15850 ("F4" Cell ) Mr.E.D.J.C. Karunasena, if his increment date is 2022-07-10 ("F6" cell) & increment should calculate up to 2022-11-30
("C15" cell). For his Overtime arrears, I want to get sum of paid Overtime amount from 2022-September to 2022-November from "DataBase"
sheet - Colum "F" value. if his increment date is 2022-07-20 ("F6" cell) I want to get sum of paid Overtime amount from 2022-October to 2022-
November

* For "F9" cell - Paid Salary: According to "F4" Cell Value (P.F. No.), I hope to get last month paid salary from "DataBase" sheet - Colum "E"
(Salary),according to the month in "F6" cell (Date of Increment).
Eg. PF No. 15850 ("F4" Cell ) Mr.E.D.J.C. Karunasena, his increment date is 2022-07-10 ("F6" cell), I want to get the 2022-November paid salary from "DataBase" sheet - Colum "E" value.

Anyone, please help me.

Thanks,

Priyantha
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Calculate increments

Post by HansV »

I have move the above post to a separate topic since it had little to do with the topic it was posted in.
Best wishes,
Hans

Priyantha
StarLounger
Posts: 86
Joined: 10 Oct 2022, 02:52

Re: Calculate increments

Post by Priyantha »

Dear Hans,

Is there any solution?

Regarding

Priyantha

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Calculate increments

Post by HansV »

Dear Priyantha,

The purpose of a discussion board such as this one is to assist people in solving their problems with Windows, Word, Excel etc., but not to solve all problems for them.
Your post is a long series of requests to create a complete solution; in my humble opinion that goes too far.
I suggest that you work on this yourself and show us what you have accomplished. If you get stuck on a detail, you can ask for help with that.
Best wishes,
Hans

Priyantha
StarLounger
Posts: 86
Joined: 10 Oct 2022, 02:52

Re: Calculate increments

Post by Priyantha »

Dear Hans,

I tryied using sumif but i could not select suitable range. Ok thanks.

Regardibg,
Priyantha