+ Reply to Thread
Results 1 to 7 of 7

Find last row with data and autofit, bold and center align

  1. #1
    Registered User
    Join Date
    01-09-2012
    Location
    here
    MS-Off Ver
    Excel 2003
    Posts
    68

    Find last row with data and autofit, bold and center align

    i need a macro to Find last row with data and autofit, bold and center align all the cells in the row
    Last edited by daillest319; 02-24-2012 at 11:32 AM.

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Find last row with data and autofit, bold and center align

    daillest319,

    Here's a simple code that may help you.

    Please Login or Register  to view this content.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

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

    Re: Find last row with data and autofit, bold and center align

    To find the last row of column A - you can use this code line
    Please Login or Register  to view this content.
    To autofit -
    Please Login or Register  to view this content.
    To bold and center align, all you need to do is just record the action and you will get the code.
    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]

  4. #4
    Registered User
    Join Date
    01-09-2012
    Location
    here
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Find last row with data and autofit, bold and center align

    Thanks i started using this code but cant seem to figure out how to make not only look just in column A but in all columns for the last row becuase some of the cells have empty data. For example the last row had A,B,C etc blank and the data starts at column G.



    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Find last row with data and autofit, bold and center align

    Hi,

    Your code

    Please Login or Register  to view this content.
    Try

    Please Login or Register  to view this content.
    But the code provided my myself and arlu1201 should do the job.

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

    Re: Find last row with data and autofit, bold and center align

    You can also use this -
    Please Login or Register  to view this content.
    You can also specify the sheet instead of Activesheet.

  7. #7
    Registered User
    Join Date
    01-09-2012
    Location
    here
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Find last row with data and autofit, bold and center align

    thank you all for all yuor help

+ 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