Attendance Sheet problem

majidsiddique

Board Regular
Joined
Oct 22, 2018
Messages
164
hi all,
i am making a attendance sheet month wise.
AG=COUNTIF($B3:$AF3,"p")
AH=COUNTIF($B3:$AF3,"L")
i want, if L more then 3 days Leave then p automatic replace with L fro given range.
cell color must be change in RED color only for this condition apply.
Khalid and nasir is example of this.
Nasir p replace 2
kahlid p replace 1

thanks
[TABLE="width: 747"]
<colgroup><col><col span="9"><col span="22"><col><col></colgroup><tbody>[TR]
[TD="colspan: 34"]Attendance Sheet 1-12-2018[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]10[/TD]
[TD]11[/TD]
[TD]12[/TD]
[TD]13[/TD]
[TD]14[/TD]
[TD]15[/TD]
[TD]16[/TD]
[TD]17[/TD]
[TD]18[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]21[/TD]
[TD]22[/TD]
[TD]23[/TD]
[TD]24[/TD]
[TD]25[/TD]
[TD]26[/TD]
[TD]27[/TD]
[TD]28[/TD]
[TD]29[/TD]
[TD]30[/TD]
[TD]31[/TD]
[TD]Total-P[/TD]
[TD]Total-L[/TD]
[/TR]
[TR]
[TD]majid[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]L[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD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D]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]L[/TD]
[TD]29[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Nasir[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]L[/TD]
[TD]L[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]L[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]L[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]p[/TD]
[TD]L[/TD]
[TD]26[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]
 
Yes MICKG,
simple countif formula cannot do it if apply direct on it.
please do it as you mention for calculation, BUT please change RED P background color RED.
one thing remind, when i open this file, coding must be working always if any change in save a file.

Thanks a lot.
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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