+ Reply to Thread
Results 1 to 11 of 11

Formatting question

  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    Mesquite, Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Formatting question

    I'm working on a schedule macro that puts the day and date at the top of each page, but it has both the day and date together. Is there a way to align the day left and the date right? This is the line that I'm using to insert the day and date.

    Please Login or Register  to view this content.
    Is there anything I can insert between dddd and mmmm to adjust the alignment?

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formatting question

    You can insert spaces or you can put the day in one cell and date in one cell.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-09-2012
    Location
    Mesquite, Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Formatting question

    I tried inserting spaces but that doesn't work too well. "A1" was a merged cell, so I split it into "A1" and "G1" and tried

    Please Login or Register  to view this content.
    but it didn't like that.

    Is there a way to put a choose weekday formula in "A1" and the date in "G1"?
    Last edited by arlu1201; 11-15-2012 at 01:10 PM.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formatting question

    Is the N a variable or is it the column N?

  5. #5
    Registered User
    Join Date
    10-09-2012
    Location
    Mesquite, Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Formatting question

    ok, that solved that problem, N is a variable for the row. I changed the cell number and it works, except all I get is the first letter of the day instead of the entire day. I have format in as dddd

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formatting question

    So do you have anything else pending in this thread?

  7. #7
    Registered User
    Join Date
    10-09-2012
    Location
    Mesquite, Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Formatting question

    Yes, it's only giving showing the first letter of the weekday name instead of the entire
    Name.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formatting question

    Is this the code you are using?
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-09-2012
    Location
    Mesquite, Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Formatting question

    That's what I had but when you asked if N is a variable ( which it is) I changed G1 to cells(2, N). Finally realized the reason I kept getting just the first letter of the weekday is because cells(2, N) is the choose weekday formula which refers to the date on cells(1, N). In short, that's the code I'm trying to use

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formatting question

    You can have the cell populate the date like -
    Please Login or Register  to view this content.
    and then add this line -
    Please Login or Register  to view this content.
    P.S - Change the bold section to match your file.

  11. #11
    Registered User
    Join Date
    10-09-2012
    Location
    Mesquite, Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Formatting question

    Thank you, that worked

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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