This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBA Code: | |
Instruction: | |
Step-1: alt+F11 | |
Step-2: Insert>Module | |
Step-3: Input/Write the Code | |
Step-4: Click Run Sub/UserForm (F5) | |
----------------------------------- | |
1. Rename Sheet basis of row or column name | |
Sub RenameSheet() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Age Calculator: =DATEDIF(M2,TODAY(),"Y") & " Years, " & DATEDIF(M2,TODAY(),"YM") & " Months, " & DATEDIF(M2,TODAY(),"MD") & " Days" | |
=DATEDIF(M2,N2,"YM") & " Months, " & DATEDIF(M2,N2,"MD") & " Days" | |
Only Month | |
=DATEDIF(A2,B2,"M") [1st is small, 2nd is large Date] | |
Only Year | |
=DATEDIF(A2,B2,"Y") [1st is small, 2nd is large Date] | |
2. Count: | |
a. Counting Specific name: =COUNTIF(F2:F10, "MISSED") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub RenameSheet() | |
Dim rs As Worksheet | |
For Each rs In Sheets | |
rs.Name = rs.Range("B2") | |
Next rs | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub bleh() | |
Dim xWs As Worksheet | |
Set xWs = ActiveSheet | |
ThisWorkbook.Worksheets.Select | |
Rows("10:20").Select | |
Selection.Delete | |
xWs.Select | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
========================== | |
--------Ascending--------- | |
========================== | |
Sub SortSheets1() | |
Dim I As Integer | |
Dim J As Integer | |
For I = 1 To Sheets.Count - 1 | |
For J = I + 1 To Sheets.Count | |
If UCase(Sheets(I).Name) > UCase(Sheets(J).Name) Then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub GetSheets() | |
'Update ExcelJunction.com | |
Path = "" | |
Filename = Dir(Path & "*.xls") | |
Do While Filename <> "" | |
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True | |
For Each Sheet In ActiveWorkbook.Sheets | |
Sheet.Copy After:=ThisWorkbook.Sheets(1) | |
Next Sheet | |
Workbooks(Filename).Close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Illuminate\Support\Facades\Schema; | |
public function boot() | |
{ | |
Schema::defaultStringLength(191); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?) | |
RewriteRule ^ /%1 [R=301,L] | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.php | |
------------ | |
<?php | |
define("DB_HOST", "localhost"); | |
define("DB_USER", "root"); | |
define("DB_PASS", ""); | |
define("DB_NAME", "your_db_name"); | |
?> |
NewerOlder