Convert Date into Day
Convert Date into Day Sub date2day() Dim tempCell As Range Selection.Value = Selection.Value For Each tempCell In Selection If IsDate(tempCell) = True Then With tempCell
Convert Date into Day Sub date2day() Dim tempCell As Range Selection.Value = Selection.Value For Each tempCell In Selection If IsDate(tempCell) = True Then With tempCell
Sub TimeStamp() Dim i As Integer For i = 1 To 24 ActiveCell.FormulaR1C1 = i & “:00” ActiveCell.NumberFormat = “[$-409]h:mm AM/PM;@” ActiveCell.Offset(RowOffset:=1, ColumnOffset:=0).Select Next i
Sub ActivateA1() If Application.ReferenceStyle = xlR1C1 Then Application.ReferenceStyle = xlA1 Else Application.ReferenceStyle = xlA1 End If End Sub This macro code will help you to
Sub ActivateR1C1() If Application.ReferenceStyle = xlA1 Then Application.ReferenceStyle = xlR1C1 Else Application.ReferenceStyle = xlR1C1 End If End Sub This macro code will help you to
Public Function rvrse(ByVal cell As Range) As String rvrse = VBA.strReverse(cell.Value) End Function All you have to do just enter “rvrse” function in a cell
Sub degreeSymbol( ) Dim rng As Range For Each rng In Selection rng.Select If ActiveCell <> “” Then If IsNumeric(ActiveCell.Value) Then ActiveCell.Value = ActiveCell.Value &
Public Function removeFirstC(rng As String, cnt As Long) removeFirstC = Right(rng, Len(rng) – cnt) End Function How to Remove Characters from a String or cell
Sub RemoveSpaces() Dim myRange As Range Dim myCell As Range Select Case MsgBox(“You Can’t Undo This Action. ” _ & “Save Workbook First?”, _ vbYesNoCancel,
Sub Word_Count_Worksheet() Dim WordCnt As Long Dim rng As Range Dim S As String Dim N As Long For Each rng In ActiveSheet.UsedRange.Cells S =
Sub removeDecimals() Dim lnumber As Double Dim lResult As Long Dim rng As Range For Each rng In Selection rng.Value = Int(rng) rng.NumberFormat = “0”
Sub removeApostrophes() Selection.Value = Selection.Value End Sub VBA Macro Code to Remove the Apostrophe from a Number in Excel If you have numeric data where
Sub addNumber() Dim rng As Range Dim i As Integer i = InputBox(“Enter number to multiple”, “Input Required”) For Each rng In Selection If WorksheetFunction.IsNumber(rng)
Get organized with our free, customizable Excel templates
© 2023 xlsxtemplates all rights reserved