nabila nordin
Member
Members
Forum Posts: 7
Member Since:
August 18, 2022
August 18, 2022
Offline
I have difficulty doing:
1. If the user "Leave date" 13-Jul-22", "Payroll Status" is "Inactive".
The result in "Active" field is "No" and "custom_field: Last day of work" is 13/07/2022
2. If the user "Leave date" 31-Aug-22", "Payroll Status" is "Inactive".
The result in "Active" field is "Yes" and "custom_field: Last day of work" is 31/08/2022
Herewith I attach the latest file for your reference.
I'm stuck with this and need your guidance.
Catalin Bombea
Iasi, Romania
Member
Dashboards
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
Forum Posts: 1944
Member Since:
November 8, 2013
November 8, 2013
Offline
Hi Nabila,
1. If the user "Leave date" 13-Jul-22", "Payroll Status" is "Inactive".The result in "Active" field is "No" and "custom_field: Last day of work" is 13/07/20222. If the user "Leave date" 31-Aug-22", "Payroll Status" is "Inactive".The result in "Active" field is "Yes" and "custom_field: Last day of work" is 31/08/2022
For RangeToFilter, you have set an Autofilter:
.AutoFilter Field:=9, Criteria1:="=Active"
Therefore, these entries with Inactive will not show up in the filtered sheet. If you want them to show up in the filter sheet, don't filter them out.
This loop can be cleaned up, formatting should be done outside the loop:
For k = 2 To nwsLastRow
nws.Cells(k, 6) = IIF(nws.Cells(k, 6) = "Active", "Yes", "No")
If nws.Cells(k, 14) = "-" Then nws.Cells(k, 14) = ""
Next k
nws.Range(nws.Cells(2, 10), nws.Cells(nwsLastRow, 10)).NumberFormat = "dd/mm/yyyy"
nws.Range(nws.Cells(2, 14), nws.Cells(nwsLastRow, 14)).NumberFormat = "dd/mm/yyyy"
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1944
SunnyKow: 1432
Anders Sehlstedt: 956
Purfleet: 415
Hans Hallebeek: 377
Frans Visser: 351
David_Ng: 318
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Techia Braveboy
Charles Buchanan
Tiago Braga
Rehan Baig
Fred HORVATH
Silke Schmidt
Stuart Barr
Amelia Nolte
David Wier
T P Collins
Forum Stats:
Groups: 3
Forums: 25
Topics: 7154
Posts: 31383
Member Stats:
Guest Posters: 50
Members: 34655
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —