Finding Employee Rest

Dexir

New Member
Joined
Oct 27, 2018
Messages
38
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
Hi, i have large numbers of employee's attendance, i want to know about their rest day, how can i find with formula?
i have used the if condition, and this is some kind of lengthy. please let me know if there is an other short formula.
Thanks in advance
=IF(C2="R",$C$1,IF(D2="R",$D$1,IF(E2="R",$E$1,IF(F2="R",$F$1,IF(G2="R",$G$1,IF(H2="R",$H$1,IF(I2="R",$I$1)))))))
i am using this formula

MonTueWedThuFriSatSun
251590​
Sameer HayatPRPPPPPTue
251663​
Noman MazharPPPPPPRSun
251697​
Mazhar HayatRAPPPPAMon
251944​
Fiaz AhmadCLHPPPRAAFri
251953​
Abdul MateenPPPRPPPThu
252324​
Yasir NawazPPRPPAPWed
252409​
Azmat AliPPPPPPRSun
252430​
Muhammad Zeeshan AnPPRPPPPWed
252447​
Faisal NawazPPPPPRPSat
252678​
Muhammad SabirPPPPRPAFri
253603​
Ghulam MujtabaPPPRPPPThu
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
How about
Fluff.xlsm
ABCDEFGHIJ
1MonTueWedThuFriSatSun
2251590Sameer HayatPRPPPPPTue
3251663Noman MazharPPPPPPRSun
4251697Mazhar HayatRAPPPPAMon
5251944Fiaz AhmadCLHPPPRAAFri
6251953Abdul MateenPPPRPPPThu
7252324Yasir NawazPPRPPAPWed
8252409Azmat AliPPPPPPRSun
9252430Muhammad Zeeshan AnPPRPPPPWed
10252447Faisal NawazPPPPPRPSat
11252678Muhammad SabirPPPPRPAFri
12253603Ghulam MujtabaPPPRPPPThu
Master
Cell Formulas
RangeFormula
J2:J12J2=LOOKUP(2,1/(C2:I2="R"),$C$1:$I$1)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
Here is an alternative means with Power Query
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Column1", "Column2"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] = "R")),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Value"}),
    #"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[Attribute]), "Attribute", "Column2")
in
    #"Pivoted Column"

Column1MonTueWedThuFriSatSun
251590Sameer Hayat
251663Noman Mazhar
251697Mazhar Hayat
251944Fiaz Ahmad
251953Abdul Mateen
252324Yasir Nawaz
252409Azmat Ali
252430Muhammad Zeeshan An
252447Faisal Nawaz
252678Muhammad Sabir
253603Ghulam Mujtaba
 
Upvote 0
Thank you alansidman, i just want to know the formula.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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