Convert 01.01.2024 to 01/01/2024 to count as date in Excel.
=DATE(RIGHT(A2,4),MID(A2,FIND(".",A2,1)+1,FIND(".",A2,FIND(".",A2,1)+1)-FIND(".",A2,1)-1),MID(A2,1,FIND(".",A2,1)))
Convert 01.01.2024 to 01/01/2024 to count as date in Excel.
=DATE(RIGHT(A2,4),MID(A2,FIND(".",A2,1)+1,FIND(".",A2,FIND(".",A2,1)+1)-FIND(".",A2,1)-1),MID(A2,1,FIND(".",A2,1)))
=TEXTAFTER(A2, "@")
or,
=MID(A1, FIND("@", A1) + 1, LEN(A1) - FIND("@", A1))
Sub Print1()
For a = 1 To 10
Sheet3.Range("L2").Value = a
ActiveWindow.SelectedSheets.PrintOut copies:=1, collate:=True,
IgnorePrintAreas:=False
Next
End Sub
Sub ExportRangeToPDF()
For a = 3 To 10
Sheet1.Range("D4").Value = Sheet2.Cells(a, "A")
Sheet1.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Users\Naeem\OneDrive\Desktop\PrintingPDF\" & Sheet1.Range("D4").Value & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Next
End Sub
Sub repeatBotRows()
Dim botRows As Range, botCount As Long
Dim firstPgBk As Long, LasRow As Long
Dim totPages As Long, n As Long, m As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Set botRows = Range("2:7")
Sheets("Sheet1").Copy after:=Sheets("Sheets1")
ActiveSheet.Name = "printOrig"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
End With
firstPgBk = ActiveSheet.HPageBreaks(1).Location.Row - 1
botCount = botRows.Rows.Count
LasRow = Cells.Find("*", [a1], , , xlByRows, xlPrevious).Row
totPages = Application.Ceiling(LasRow / (firstPgBk - botCount - 1), 1)
Range(Rows(firstPgBk - botCount + 1), Rows(firstPgBk)).Select
Selection.EntireRow.Insert Shift:=xlDown
botRows.Copy Range("A" & firstPgBk - botCount + 1)
n = 2
m = 0
Do
Range(Rows(firstPgBk * n - botCount - m), Rows(firstPgBk * n - m - 1)).Select
Selection.EntireRow.Insert Shift:=xlDown
botRows.Copy Range("A" & firstPgBk * n - botCount - m)
n = n + 1
m = m + 1
Loop Until n > totPages
Application.Calculation = xlCalculationAutomatic
' ActiveSheet.PrintOut
' ActiveSheet.Delete
ActiveSheet.Buttons.Delete
Application.DisplayAlerts = True
End Sub
Sub MyFooter()
Dim xTxt As String
Dim xAddress As String
Dim xRg As Range
Dim xCell As Range
On Error Resume Next
xAddress = ActiveWindow.RangeSelection.Address
Set xRg = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Kutools for Excel", xAddress, , , , , 8)
If xRg Is Nothing Then Exit Sub
For Each xCell In xRg
xTxt = xTxt & xCell.Value & " "
Next
ActiveSheet.PageSetup.LeftFooter = xTxt
End Sub
Sub MyFooter()
Dim StrFtr As String, Rng As Range, Sh As Worksheet, c As Range
Set Sh = Worksheets("Sheet5")
Set Rng = Sh.Range("A55:G55")
For Each c In Rng
StrFtr = StrFtr & c & " "
Next c
ActiveSheet.PageSetup.LeftFooter = StrFtr
End Sub
The following function is for generating 8 digit unique number in excel and masked with 123:
=RANDBETWEEN(12300000,12399999)
=CONCATENATE("file://",LEFT(CELL("filename",F2),FIND("[",CELL("filename",F2))-1),F2)
=HYPERLINK($G$2,F2)
=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(100,10000)&CHAR(RANDBETWEEN(65,90))
Here the example is given for column A:
=COUNTIF($A$2:$A711,$A13)<2
scp file_name.zip username@server_ip/server_address:/directory_path