+ Reply to Thread
Results 1 to 11 of 11

Macro to to enter value underneath last row in the last column

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Macro to to enter value underneath last row in the last column

    Hi.
    Can anybody modify for me the code below so that the code will add the total sum of the last column underneath the last row? The code below works only for the last row in column "E", but I want the code to be flexible and detect the last column as well. Please note that my code also has an "auto fill down" which I would like to put in the last column as well.
    Thanks in advance.


    Please Login or Register  to view this content.
    Last edited by kosherboy; 02-03-2014 at 11:04 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Macro to to enter value underneath last row in the last column

    I tried working with the code to the best of my ability but the code doesn't work:-(

    I pasted my entire code including scripts that I originally omitted.

    I would really appreciate if anyone can shed some light on this issue.

    Thank you.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to to enter value underneath last row in the last column

    Maybe this can help?

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Macro to to enter value underneath last row in the last column

    Hi. Thanks for responding.
    This code is not summing up the last row in the last column

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to to enter value underneath last row in the last column

    It works for me. Can you attach a sample file with some data?

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Macro to to enter value underneath last row in the last column

    Here you go Row & Columns.xlsx. So basically what I would like is that the last 2 columns should be "filled down" with the formula in the last 2 columns in row "18", and then auto sum the last column in the last row. The reason for this is because there will be times where columns will be inserted however the last two column will always remain the same as far as formula wise.
    Last edited by kosherboy; 02-03-2014 at 05:37 PM.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to to enter value underneath last row in the last column

    Maybe:

    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Macro to to enter value underneath last row in the last column

    Thank you again for your response. Your code is working but when I add additional columns the code is only working for columns D and E. See attachment Row & Columns.xlsm
    It's possible I wasn't clear so I'm going to explain in detail what the code should do. Let's take into consideration that the amount of columns are unknown but the last 4 columns (the retail [which is needed for the formula], the quantity, the cost and the total cost will always be found in the last four columns. Working with these last four columns in order of retail, qty, cost and total cost I would like that the cost should = the retail * any given number (which I will would put in ,say, cell A1, so an example will be: the cell right under "retail" multiplied by the number in cell "A1").
    Next, I would like to put the following formula in the cell right underneath "total cost" which will be the following: the cell underneath "qty" should be multiplied by the cell underneath "cost" (and that will = the "total cost". These four columns are not necessarily going to always be in the same columns but they will definitely always be found in the last four columns. Next I would like to have the last two columns "filled down" until the last row.
    And the last thing I need is the total sum of the last column, so again the last column could be any column.....
    Thank you for your time and patience and I hope to hear from you soon
    Last edited by kosherboy; 02-04-2014 at 11:08 AM.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to to enter value underneath last row in the last column

    Maybe:

    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Macro to to enter value underneath last row in the last column

    You are a genious!
    To be honest I did not think this was possible! You have no idea what a breakthrough this is, Thanks and best of luck to you

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to to enter value underneath last row in the last column

    You're welcome. Glad to help out and thanks for the feedback and the rep!

+ 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] Macro to count unique values in a column, enter it in next column, then delete duplicates
    By pmorisse in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2013, 03:27 PM
  2. VBA Halp! Sort Columns by date; Insert/add Data Underneath the Cell in Column B
    By goradiar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-06-2012, 09:10 AM
  3. Replies: 0
    Last Post: 05-17-2012, 12:59 PM
  4. Vertical to horizontal one column and underneath
    By vinaynaran in forum Excel General
    Replies: 2
    Last Post: 10-14-2009, 01:02 PM
  5. macro to copy a column and put it underneath another
    By cadalist in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-28-2007, 06:59 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