Free Excel Macro : Convert Date into Day

Download now!

Download free Excel Macro : Convert Date Into Day

Macros are one of the most powerful features in Excel. They are small programs that can automate tasks and save you a lot of time.

If you are not familiar with macros, they can seem a bit daunting. But once you learn how to use them, you will wonder how you ever managed without them!

In this article, we will show you how to use the Macro "Convert Date Into Day" in Excel. We will also provide some examples of how macros can be used to automate tasks.

How to use Macros in Excel?

Macros are written in a programming language called Visual Basic for Applications (VBA). VBA is a simple language that is easy to learn.

You do not need to be a programmer to use macros. However, if you are familiar with programming, you can use VBA to create more complex macros.

There are two ways to use macros in Excel:
    1. Use a macro that is already written.
     2. Write your own macro.

For both methods check out those articles to know how to use macros in Excel: https://www.macrosinexcel.com/introduction-to-macros-in-excel/
https://www.macrosinexcel.com/create-write-macros-in-excel/
https://www.macrosinexcel.com/macros-in-excel-with-examples/

To create a macro in Excel, open the Visual Basic Editor (VBE) by pressing Alt+F11 on your keyboard.

In the VBE, select Insert > Module. This will insert a new blank module into the VBE.

In the new module, paste the code below.

For example, the following code will create a macro that will 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
.Value = Day(tempCell)
.NumberFormat = "0"
End With
End If
Next tempCell
End Sub

To run the macro, press the Run button in the toolbar (or press F5 on your keyboard).

About Convert Date Into Day Excel Macro

Assuming you have a date in cell A1, you can use a simple Excel formula to convert it into the day of the week. In cell B1, enter the following formula: =TEXT(A1,"ddd") This formula uses the TEXT function to format the date in cell A1 as a three-letter abbreviation for the day of the week. Here's how it works: The TEXT function has two arguments: The value you want to format (A1) The format code ("ddd") The format code "ddd" tells Excel to display the day of the week as a three-letter abbreviation. If you want to