+ Reply to Thread
Results 1 to 3 of 3

Convert Day to number

  1. #1
    Registered User
    Join Date
    05-20-2024
    Location
    Portugal, Aveiro
    MS-Off Ver
    Excel 2016
    Posts
    9

    Convert Day to number

    Hello group

    Today my challenge should be simple.

    I have the need to convert a Day in a number.

    Monday to 1
    Tuesday to 2
    etc.. until Sunday with 7

    Hope you can help me to use this code in one VBA i am using for simplifying a week import of data.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,492

    Re: Convert Day to number

    Can be done with a formula:

    =WEEKDAY(A2:A1312,2)
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,492

    Re: Convert Day to number

    Marked as solved.

    Glad to have helped.

    If you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Number stored as text error, convert to number script
    By dw_22801 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2023, 06:05 PM
  2. Formula to convert number into word (Indian number system) without VBA or Add-in
    By basantsharma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-22-2020, 01:54 PM
  3. Should i convert string to number before comparing against a number or leave as is
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2015, 12:04 PM
  4. Replies: 1
    Last Post: 12-15-2014, 08:46 PM
  5. [SOLVED] convert decimal number to time : convert 1,59 (minutes, dec) to m
    By agenda9533 in forum Excel General
    Replies: 22
    Last Post: 09-15-2013, 10:43 AM
  6. Replies: 1
    Last Post: 10-28-2012, 05:42 AM
  7. [SOLVED] convert text-format number to number in excel 2000%3f
    By Larry in forum Excel General
    Replies: 1
    Last Post: 07-29-2005, 04:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1