+ Reply to Thread
Results 1 to 12 of 12

Refer to last used column and fill formula

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Refer to last used column and fill formula

    Hi all,

    I am using the below to fill formula in specific column:
    Please Login or Register  to view this content.
    How can i refer to last used column and fill formula?

    Thanks a lot!

  2. #2
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Refer to last used column and fill formula

    Are you want to fill out column B starting from B2 until the last used cells in column A right?

    try both of these;

    Please Login or Register  to view this content.
    Last edited by Faridwahidi; 05-25-2016 at 05:35 AM.
    1. Thank those who have helped you by clicking the Star * below the post.
    2. Please mark your post [SOLVED] if it has been answered satisfactorily.

    Sincerely,
    Farid

  3. #3
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Refer to last used column and fill formula

    Hi,

    Thanks for a reply.
    I want to fill not in the column B but in the last used column.

    Cheers

  4. #4
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Refer to last used column and fill formula

    It would be easier to understand if you would upload a sample spreadsheet but in my understanding try below code and see if that what you are looking for.

    Please Login or Register  to view this content.
    Hope That helped

  5. #5
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Refer to last used column and fill formula

    Hi,

    I am looking for the code which would fill the first empty column with formula till the last used row in column A
    For example: A column filled, B filled, C filled. Macro needs then to find D and fill dawn the formula according last used row in column A.
    Please let me know if spreadsheet is needed then i will upload it in the evening!

    Thanks

  6. #6
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Refer to last used column and fill formula

    I have created a sample spreadsheet for you. see the code what you are looking for. obviously you need to change the number 3 to whatever formula you want to use.

    Quote Originally Posted by S1n1 View Post
    Hi,

    I am looking for the code which would fill the first empty column with formula till the last used row in column A
    For example: A column filled, B filled, C filled. Macro needs then to find D and fill dawn the formula according last used row in column A.
    Please let me know if spreadsheet is needed then i will upload it in the evening!

    Thanks
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Refer to last used column and fill formula

    Great, it works!

    Just one small issue - the formula somehow becomes not dynamic, e.g. =A1+B1 not changing to A2+B2 fpr second row

  8. #8
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Refer to last used column and fill formula

    Figured that out myself!!!! Thanks again all for help!

  9. #9
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Refer to last used column and fill formula

    You're welcome. if you don't mind mark your post as solved so others with same problem can used it too

  10. #10
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Refer to last used column and fill formula

    Hey,

    I still have a problem...;/

    When I am using formulas with RC then it works well. Any idea why it's not working when I directly pointing to cell like A12. It fills only to A12 and not changing to A13, A14 for the next lines?

  11. #11
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Refer to last used column and fill formula

    It is not clear exactly what are you trying to achieve but if you mean your calculations displays only in A12 and after that they are not moving to A13, A14 etc then you need to add +1 next to lr (last row) whenever you defined to move on to the next row.

    Quote Originally Posted by S1n1 View Post
    Hey,

    I still have a problem...;/

    When I am using formulas with RC then it works well. Any idea why it's not working when I directly pointing to cell like A12. It fills only to A12 and not changing to A13, A14 for the next lines?

  12. #12
    Registered User
    Join Date
    06-07-2013
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Refer to last used column and fill formula

    Perfect, thanks a lot! Marking posted as closed

+ 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] Refer to cells in formula using column headers
    By surePac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2014, 01:25 PM
  2. Refer to Column Location Variable in Formula
    By newnoise in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2013, 06:36 PM
  3. Excel formula for filling column refer to multiple criteria
    By TJTL in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-24-2012, 08:33 PM
  4. Replies: 1
    Last Post: 09-07-2011, 05:57 PM
  5. looking for the correct sheet and fill in the value refer to date
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2010, 04:17 AM
  6. Formula to refer to changing Column
    By Kenny Markhardt in forum Excel General
    Replies: 1
    Last Post: 10-10-2005, 07:05 PM
  7. How to refer to current column in a formula?
    By jmg092548 in forum Excel General
    Replies: 4
    Last Post: 08-10-2005, 03:05 PM

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