Help with an excel file automation

%3CLINGO-SUB%20id%3D%22lingo-sub-1764115%22%20slang%3D%22en-US%22%3EHelp%20with%20an%20excel%20file%20automation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764115%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20attached%20an%20excel%20file%2C%20which%20contain%204%20spreadsheets%2C%20of%20a%20monthly%20schedule%20in%20my%20work.%3C%2FP%3E%3CP%3EThe%20schedule%20contains%20%E2%80%98on-call%20shifts%E2%80%99%20and%20%E2%80%98nightshifts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20filter%20my%20name%20from%20the%20tables%2C%20but%20unfortunately%2C%20haven%E2%80%99t%20succeeded.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20will%20be%20a%20significant%20help%20if%20anyone%20could%20guide%20me%20how%20to%20do%20it.%3C%2FP%3E%3CP%3EI%20feel%20that%20there%20is%20a%20better%20and%20more%20efficient%20way%20of%20this%20repetitive%20task%E2%80%A6%20each%20month%20to%20manually%20search%20for%20my%20name%20and%20then%20make%20a%20new%20google%20calendar%20event%20for%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EAmir%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1764115%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1764418%22%20slang%3D%22de-DE%22%3ESubject%3A%20Help%20with%20an%20excel%20file%20automation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764418%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F826419%22%20target%3D%22_blank%22%3E%40Amir_Zbede%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22text-wrap%20tlid-copy-target%22%3E%3CDIV%20class%3D%22result-shield-container%20tlid-copy-target%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EShalom%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EEnclosed%20your%20file%20with%20a%20filter%2C%20I%20am%20not%20sure%20whether%20this%20is%20what%20you%20want.%3C%2FSPAN%3E%20%3CSPAN%3EBut%20it's%20worth%20a%20try.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ETake%20a%20look%20at%20the%20file%2C%20if%20that's%20okay%20I%20would%20love%20to%20know.%3C%2FSPAN%3E%20%3CSPAN%3EIf%20not%2C%20I%20would%20appreciate%20your%20feedback.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EIt%20would%20also%20be%20helpful%20if%20you%20inform%20us%20about%20the%20Excel%20version%20and%20your%20operating%20system%2C%20so%20that%20you%20can%20always%20receive%20faster%20and%20more%20precise%20help.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22tlid-result-transliteration-container%20result-transliteration-container%20transliteration-container%22%3E%3CDIV%20class%3D%22tlid-transliteration-content%20transliteration-content%20full%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22tlid-transliteration-content%20transliteration-content%20full%22%3E%3CP%3EThank%20you%20for%20your%20understanding%20and%20patience%3C%2FP%3E%3CP%3E%D7%AA%D7%95%D7%93%D7%94%20%D7%A2%D7%9C%20%D7%94%D7%94%D7%91%D7%A0%D7%94%20%D7%95%D7%94%D7%A1%D7%91%D7%9C%D7%A0%D7%95%D7%AA%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1764568%22%20slang%3D%22en-US%22%3EBetreff%3A%20Help%20with%20an%20excel%20file%20automation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764568%22%20slang%3D%22en-US%22%3EThank%20you%20Nicolino!%3CBR%20%2F%3EEach%20column%20is%20for%20a%20different%20type%20of%20shift.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20need%20the%20excel%20to%3CBR%20%2F%3E1.%20Find%20my%20name%2C%20'ZBEDE%20A'%3CBR%20%2F%3E2.%20Output%20the%20dates%2Bcolumn%20names.%3CBR%20%2F%3E3.%20Create%20a%20new%20event%20in%20the%20respective%20date%2C%20and%20column%20name%20in%20my%20Google%20Calendar%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20very%20much!!%3C%2FLINGO-BODY%3E
New Contributor

I have attached an excel file, which contain 4 spreadsheets, of a monthly schedule in my work.

The schedule contains ‘on-call shifts’ and ‘nightshifts.

 

I tried to filter my name from the tables, but unfortunately, haven’t succeeded.

 

It will be a significant help if anyone could guide me how to do it.

I feel that there is a better and more efficient way of this repetitive task… each month to manually search for my name and then make a new google calendar event for it.

 

Thank you,

Amir

 

3 Replies

@Amir_Zbede 

 

Shalom,

Enclosed your file with a filter, I am not sure whether this is what you want. But it's worth a try.
Take a look at the file, if that's okay I would love to know. If not, I would appreciate your feedback.

It would also be helpful if you inform us about the Excel version and your operating system, so that you can always receive faster and more precise help.
 

Thank you for your understanding and patience

תודה על ההבנה והסבלנות 

 

Nikolino

I know I don't know anything (Socrates)

Thank you Nicolino!
Each column is for a different type of shift.

I need the excel to
1. Find my name, 'ZBEDE A'
2. Output the dates+column names.
3. Create a new event in the respective date, and column name in my Google Calendar

Thank you very much!!

@Amir_Zbede 

Found a nice way:

 

Filter formula:

=FILTER('כוננים ותורנים'!A2:O33,('כוננים ותורנים'!B2:B33="ZBEDE A")+('כוננים ותורנים'!C2:C33="ZBEDE A")+('כוננים ותורנים'!D2:D33="ZBEDE A")+('כוננים ותורנים'!E2:E33="ZBEDE A")+('כוננים ותורנים'!F2:F33="ZBEDE A")+('כוננים ותורנים'!G2:G33="ZBEDE A")+('כוננים ותורנים'!H2:H33="ZBEDE A")+('כוננים ותורנים'!I2:I33="ZBEDE A")+('כוננים ותורנים'!J2:J33="ZBEDE A")+('כוננים ותורנים'!K2:K33="ZBEDE A")+('כוננים ותורנים'!L2:L33="ZBEDE A")+('כוננים ותורנים'!M2:M33="ZBEDE A")+('כוננים ותורנים'!N2:N33="ZBEDE A")+('כוננים ותורנים'!O2:O33="ZBEDE A"))

 

=FILTER('השלמה והנהלה'!A2:H33,('השלמה והנהלה'!B2:B33="ZBEDE A")+('השלמה והנהלה'!C2:C33="ZBEDE A")+('השלמה והנהלה'!D2:D33="ZBEDE A")+('השלמה והנהלה'!E2:E33="ZBEDE A")+('השלמה והנהלה'!F2:F33="ZBEDE A")+('השלמה והנהלה'!G2:G33="ZBEDE A")+('השלמה והנהלה'!H2:H33="ZBEDE A"))

 

=FILTER(OBSTETR!A2:H33,(OBSTETR!B2:B33="ZBEDE A")+(OBSTETR!C2:C33="ZBEDE A")+(OBSTETR!D2:D33="ZBEDE A")+(OBSTETR!E2:E33="ZBEDE A")+(OBSTETR!F2:F33="ZBEDE A")+(OBSTETR!G2:G33="ZBEDE A")+(OBSTETR!H2:H33="ZBEDE A"))

 

 

 

and here it is with Macro:

Sub SCHEDULE()
'
' SCHEDULE Macro
'
' Keyboard Shortcut: Ctrl+t
'

Worksheets(1).Select
ActiveSheet.Name = "a"
Worksheets(2).Select
ActiveSheet.Name = "b"
Worksheets(4).Select
Sheets.Add After:=ActiveSheet
ActiveSheet.DisplayRightToLeft = True
Sheets("a").Select
Range("B2:O2").Select
Selection.Copy
Sheets("Sheet1").Select
Range("B1").Select
ActiveSheet.Paste
Range("A1").Select
ActiveCell.FormulaR1C1 = "Date"
Range("A10").Select
ActiveCell.FormulaR1C1 = "Date"
Range("I10").Select
Selection.NumberFormat = "General"
ActiveCell.FormulaR1C1 = "Date"
Range("A2:A9").Select
Selection.NumberFormat = "d"
Range("A11:A17").Select
Selection.NumberFormat = "d"
Range("I11:I17").Select
Selection.NumberFormat = "d"
Sheets("b").Select
Range("B2:H2").Select
Selection.Copy
Sheets("Sheet1").Select
Range("J10").Select
ActiveSheet.Paste
Sheets("OBSTETR").Select
Range("B2:H2").Select
Selection.Copy
Sheets("Sheet1").Select
Range("B10").Select
ActiveSheet.Paste
Range("A2").Select
ActiveCell.Formula2R1C1 = _
"=FILTER(a!RC:R[31]C[14],(a!RC[2]:R[31]C[2]=""ZBEDE A"")+(a!RC[3]:R[31]C[3]=""ZBEDE A"")+(a!RC[4]:R[31]C[4]=""ZBEDE A"")+(a!RC[5]:R[31]C[5]=""ZBEDE A"")+(a!RC[6]:R[31]C[6]=""ZBEDE A"")+(a!RC[7]:R[31]C[7]=""ZBEDE A"")+(a!RC[8]:R[31]C[8]=""ZBEDE A"")+(a!RC[9]:R[31]C[9]=""ZBEDE A"")+(a!RC[10]:R[31]C[10]=""ZBEDE A"")+(a!RC[11]:R[31]C[11]=""ZBEDE A"")+(a!RC[12]:R[31]C[12]=""ZBEDE A"")+(a!RC[13]:R[31]C[13]=""ZBEDE A"")+(a!RC[14]:R[31]C[14]=""ZBEDE A""))"
Range("A2").Select
Range("I11").Select
ActiveCell.Formula2R1C1 = _
"=FILTER(b!R[-9]C[-8]:R[22]C[-1],(b!R[-9]C[-8]:R[22]C[-8]=""ZBEDE A"")+(b!R[-9]C[-7]:R[22]C[-7]=""ZBEDE A"")+(b!R[-9]C[-6]:R[22]C[-6]=""ZBEDE A"")+(b!R[-9]C[-5]:R[22]C[-5]=""ZBEDE A"")+(b!R[-9]C[-4]:R[22]C[-4]=""ZBEDE A"")+(b!R[-9]C[-3]:R[22]C[-3]=""ZBEDE A"")+(b!R[-9]C[-2]:R[22]C[-2]=""ZBEDE A"")+(b!R[-9]C[-1]:R[22]C[-1]=""ZBEDE A""))"
Range("I11").Select
Range("A11").Select
ActiveCell.Formula2R1C1 = _
"=FILTER(OBSTETR!R[-9]C:R[22]C[7],(OBSTETR!R[-9]C[1]:R[22]C[1]=""ZBEDE A"")+(OBSTETR!R[-9]C[2]:R[22]C[2]=""ZBEDE A"")+(OBSTETR!R[-9]C[3]:R[22]C[3]=""ZBEDE A"")+(OBSTETR!R[-9]C[4]:R[22]C[4]=""ZBEDE A"")+(OBSTETR!R[-9]C[5]:R[22]C[5]=""ZBEDE A"")+(OBSTETR!R[-9]C[6]:R[22]C[6]=""ZBEDE A"")+(OBSTETR!R[-9]C[7]:R[22]C[7]=""ZBEDE A""))"
Range("A11").Select
Worksheets(5).Select
ActiveSheet.Name = "My Schedule"

End Sub

 

 

Thanks!