• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

How to insert the Day in column (B) in Automatic form|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / How to insert the Day in column (B) in Automatic form|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosHow to insert the Day in column (B)…
sp_PrintTopic sp_TopicIcon
How to insert the Day in column (B) in Automatic form
Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
1
April 20, 2019 - 3:32 am
sp_Permalink sp_Print

Hi everyone My name is A.Maurizio
And my problem is this:
On a Sheet of Excell in the Column (A2: A100) I inserted some Dates such as:
(01/04/2019) etc ...!
Now my question is this:
If I wanted to create automatically, that is using vba that gives me the possibility that at each date entered in column (A) in Column (B) one should only see the corresponding Day of the type:
Cell (A2) = (01/04/2019) in the Cell (B2) = Monday
Cell (A3) = (02/04/2019) in the Cell (B3) = Tuesday
and so on !
I succeed in my own but only for the first cell, while I would like to be able to get everything for the others as well.
Thank you for all the help you want to give me regarding Saluti Da Maurizio

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
April 20, 2019 - 10:25 am
sp_Permalink sp_Print

Hi Maurizio,

You can use this rather than VBA to get the day name in B2

=TEXT(A2,"DDDD")

Regards

Phil

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
3
April 20, 2019 - 5:50 pm
sp_Permalink sp_Print

Hi Philip Treacy thanks for your Aiutino.
But maybe I didn't explain myself well, but my request was not so much to enter the day based on the only date put in the cell (A2)
But to be able to extend it to all the others.
Example I scroll a date in column (A) in the same row of column (B) we need to see the Corresponding Week Day;
That's all.
And not as in my case that if I want to intervene in column (B2) onwards I have to do it by manually dragging the cell (B2) downwards.

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
April 20, 2019 - 10:05 pm
sp_Permalink sp_Print

Just copy the formula down ColB starting at B2 i.e.

=TEXT(A2,"DDDD")

=TEXT(A3,"DDDD")

=TEXT(A4,"DDDD")

=TEXT(A5,"DDDD")

etc

Phil

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
5
April 21, 2019 - 1:03 am
sp_Permalink sp_Print

Thanks Philip Treacy but that's not what I'd like to do.
(p.s) in addition I having ofice 2007 your method gives me error so that you wrote it to me.
But then again this is not the point.
The point is that I would create the same thing not only using vba but in the whole column (B) where in Column (A) we meet an Extended Date, Everything here.
Thank you for your support, Greetings and Happy Easter

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
6
April 21, 2019 - 11:00 am
sp_Permalink sp_Print

Hi Maurizio,

I don't understand what you are trying to do then.  It seemed that you were asking to extract the day from a date in ColA?  Which is what that formula does.

Regards

Phil

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
7
April 21, 2019 - 4:35 pm
sp_Permalink sp_Print

Hi Philip Treacy
To be able to explain myself better, Try to take a look at this last file both as regards Sheet 1 and sheet 2
The explanations are all internal gold Thanks Infinite for your availability:
Greetings from A. Maurizio

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
8
April 21, 2019 - 6:44 pm
sp_Permalink sp_Print

Hi Maurizio,

I'm not having any problem with this.  If the cell A9 contains a date, then the formula =TEXT(A9,"DDDD") gives me the day of the week.

Have you tried typing the formula in yourself into a new workbook, rather than using my formula and copying/dragging?  I don't see where the issue is so if it's not working for you I'm unable to offer any suggestion as to why.

regards

Phil

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
9
April 22, 2019 - 5:49 pm
sp_Permalink sp_Print

Hi Philip Treacy Sorry if I answer you just now; But I was busy with friends and relatives.
And even today it is applied again; This is all another story.
Having said this: Continue to thank you for your madness and availability; But I ask you to take a look at this image of mine, made only a few seconds ago in another Excel application; Which has nothing to do with the previous project.
And the result is this.
(P.s) In addition, I want to clarify that: I work with Microsoft Office 2007, which you surely have 2016 I have!
Maybe that's not right.

Finally said: Yesterday morning it occurred to me that I had already done something similar to this many years ago when I was working with VB6.
Therefore I managed to solve the whole by doing it this way.

Sub Data_Corrispondente()
On Error GoTo finish
Dim C As Range, Separ As Variant, Fecha As String
Dim Celda As Variant
Set C = Foglio2.Range("A1:A" & Foglio2.Range("A" & Rows.Count).End(xlUp).Row)
For Each Celda In C
With Celda
If IsDate(.Value) Then
Separ = Split(.Text, "/")
Fecha = Separ(1) & "/" & Separ(0) & "/" & Separ(2)
.Offset(, 1) = Application.WorksheetFunction.Text(Fecha, "dddd")
End If
End With
Next Celda
finish:
End Sub

Thanks again for everything
Sincere Greetings from A.Maurizio
Excuse me if the listing does not put it under (Code <>) in my Post But I can never understand where this symbol is to do things as should be done.
Thank you so much and Happy Holidays

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 205
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
stuart burge
Bruce Tang Nian
Scot C
Othman AL MUTAIRI
Misael Gutierrez Sr.
Attif Ihsan
Kieran Fee
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Forum Stats:
Groups: 3
Forums: 24
Topics: 6223
Posts: 27295

 

Member Stats:
Guest Posters: 49
Members: 31920
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.