Results 1 to 4 of 4

Thread: Change the Settings of Excel Column

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2008
    Posts
    474

    Change the Settings of Excel Column

    I download the calandar from the net free
    http://www.wincalendar.com/calendar-maker.html

    Suppose the user selects the dats 16-May-2010 ,then in cell the value is 5/16/2010 because excel by default format is DMY. Can we chnage this format,I wnat that when the user selects the date 16-May-2010 ,Then I want that in cell value to be 16/5/2010. Is it possible?? How to do that??

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Change the Settings of Excel Column

    format the cells as date in the required format
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Change the Settings of Excel Column

    Many ways you can do it...

    1) Like Pete mentioned, Format the cells by right clicking on it and select 'Format Cells'. Under Number "Tab", select Custom and in 'Type' type d/m/yyyy. Click Ok.

    OR

    2) Change the regional settings of your computer by clicking on Control Panel. See this link on how to do it.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Change the Settings of Excel Column

    you can also change the cell formatting by code
    range("c:c").numberformat = "dd/mm/yyyy"
    Last edited by westconn1; May 17th, 2010 at 05:32 AM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width