tarİh hesaplamalari

5
İKİ TARİH ARALIĞI ÇIKARMA İŞLEMİ YIL =ETARİHLİ(TARİH(A3;B3;C3);TARİH(A2;B2;C2);"y") AY =ETARİHLİ(TARİH(A3;B3;C3);TARİH(A2;B2;C2);"ym") GÜN =ETARİHLİ(TARİH(A3;B3;C3);TARİH(A2;B2;C2);"md") 2-AD SOYAD SOYAD BÜYÜK =YAZIM.DÜZENİ(SOLDAN(A1;BUL("*";YERİNEKOY(A1;" ";"*";UZUNLUK(A1)- UZUNLUK(YERİNEKOY(A1;" ";""))))-1))&" "&BÜYÜKHARF(SAĞDAN(A1;UZUNLUK(A1)-BUL("*";YERİNEKOY(A1;" ";"*";UZUNLUK(A1)-UZUNLUK(YERİNEKOY(A1;" ";"")))))) =SOLDAN(A1;BUL(" ";A1;1)-1)&" "&BÜYÜKHARF(SAĞDAN(A1;UZUNLUK(A1)- BUL(" ";A1;1)))

Upload: judaswashere

Post on 05-Jan-2016

251 views

Category:

Documents


0 download

DESCRIPTION

TARİH HESAPLAMALARI

TRANSCRIPT

Page 1: TARİH HESAPLAMALARI

İKİ TARİH ARALIĞI ÇIKARMA İŞLEMİ

YIL

=ETARİHLİ(TARİH(A3;B3;C3);TARİH(A2;B2;C2);"y")

AY

=ETARİHLİ(TARİH(A3;B3;C3);TARİH(A2;B2;C2);"ym")

GÜN

=ETARİHLİ(TARİH(A3;B3;C3);TARİH(A2;B2;C2);"md")

2-AD SOYAD SOYAD BÜYÜK

=YAZIM.DÜZENİ(SOLDAN(A1;BUL("*";YERİNEKOY(A1;" ";"*";UZUNLUK(A1)-UZUNLUK(YERİNEKOY(A1;" ";""))))-1))&" "&BÜYÜKHARF(SAĞDAN(A1;UZUNLUK(A1)-BUL("*";YERİNEKOY(A1;" ";"*";UZUNLUK(A1)-UZUNLUK(YERİNEKOY(A1;" ";""))))))

=SOLDAN(A1;BUL(" ";A1;1)-1)&" "&BÜYÜKHARF(SAĞDAN(A1;UZUNLUK(A1)-BUL(" ";A1;1)))

Page 2: TARİH HESAPLAMALARI

3-ÇALIŞMA SAYFASINI BUTON İLE PDF ÇEVİRME

Sub savePDF()Dim Yol As StringApplication.ScreenUpdating = FalseApplication.DisplayAlerts = FalseYol = ThisWorkbook.PathSay = CreateObject("Scripting.FileSystemObject").getfolder(Yol).Files.Count + 1

Sheets("TABLO").PageSetup.PrintArea = "$A$1:$AV$75"

Sheets(Array("TABLO")).Select

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Yol & "\" & Say & ".pdf", _Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _OpenAfterPublish:=TrueApplication.ScreenUpdating = TrueApplication.DisplayAlerts = True

MsgBox "işlem tamam"

End Sub

Page 3: TARİH HESAPLAMALARI

4-ÇALIŞMA SAYFASI PDF VE OTOMATİK MAİL

Sub savePDF()

Application.ScreenUpdating = False

dosya_adı = InputBox("Dosya isimini değiştirebilirsiniz.", "UYARI!", "deneme")

If dosya_adı = "" ThenMsgBox "Dosya ismini yazmadınız"Exit SubEnd If

msg1 = MsgBox("Dosya göndermek istiyormısunuz. ?", vbYesNo + vbInformation, "uyarı")

Yol = ThisWorkbook.PathSay = CreateObject("Scripting.FileSystemObject").getfolder(Yol).Files.Count + 1Sheets("TABLO").PageSetup.PrintArea = "$A$1:$AV$75"

Sheets(Array("TABLO")).Selectdosya = Yol & "\" & dosya_adı & Say & ".pdf"ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=dosya, _Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

Set objEmail = CreateObject("CDO.Message")

kullanici_sahibi = "kullanıcı@gmail.com"kullanici_parola = "parola"

objEmail.To = "[email protected]" ' Gönderilecek e-mail adresiobjEmail.From = kullanici_sahibi ' Gönderen e-mail adresi

objEmail.Subject = "Ekli Dosya" 'konu

Txt1 = "Merhaba Sayın Yetkili1"Txt2 = "Merhaba Sayın Yetkili2"Txt3 = "Merhaba Sayın Yetkili3"

objEmail.HTMLBody = Txt1 & vbCrLf & Txt2 & vbCrLf & Txt3

If msg1 = vbYes ThenApplication.Wait (Now + TimeValue("00:00:02"))objEmail.Addattachment dosya '"C:\deneme.txt" ' eğer isterseniz eklenecek dosyaEnd If

With objEmail.Configuration.Fields

Page 4: TARİH HESAPLAMALARI

.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = kullanici_sahibi '"kullanıcı@hotmail.com".Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = kullanici_parola '"parola".Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com".Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True.Update

End WithobjEmail.Send

Application.ScreenUpdating = True

MsgBox "işlem tamam.", vbApplicationModal, "Bilgilendirme!"

End Sub