+ Reply to Thread
Results 1 to 9 of 9

Apply Formula Uptill Last Row

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Apply Formula Uptill Last Row

    Hello Again,

    I am seeking for a vba macros on the below mentioned details.

    I am trying to apply a formula in comuln G uptill last row based on column A. Means if column A have data till row no. 17 then the fomula will be implemented till row 17 in column G.

    I hope it is clear mentioned details for seeking help from a expert user.

    Copy of a sample file is attached for your understanding.
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Apply Formula Uptill Last Row

    Here is a sample


    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Apply Formula Uptill Last Row

    Thanks for your reponse Mr. Jeff,

    I am applying formula through vba macros recording something like this

    Please Login or Register  to view this content.
    But it is giving me an error saying "Application-defined or object-defined error".

    ---------- Post added at 07:04 AM ---------- Previous post was at 07:00 AM ----------

    Just now i have tested my formula though vba recording it is displaying the same error.

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Apply Formula Uptill Last Row

    The formula you have posted within the snippet of code is in R1C1

    So, replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    Because this formula is so long I broke it into multiple rows
    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 08-10-2012 at 09:04 AM.

  5. #5
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Apply Formula Uptill Last Row

    This should work fine for you -


    Please Login or Register  to view this content.
    Last edited by bonny24tycoon; 08-10-2012 at 08:50 AM. Reason: Updated Code
    Thanks,

    Bonny Tycoon


  6. #6
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Apply Formula Uptill Last Row

    Thanks Bonny.

    It works. I have one more request. If a user plugin the deails from column A to Column F the formula will execute automatically. Can it be possible.

  7. #7
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Apply Formula Uptill Last Row

    Yes, it is possible...

    Giveme a minute while i put this in a code...

  8. #8
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Apply Formula Uptill Last Row

    Here you go..

    I have added a module and a private sub.. You should be fine.. Apply Formula Uptill Last Row.xlsm

  9. #9
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Apply Formula Uptill Last Row

    Thanks for your help. Topic marked as closed and reputation added.

+ 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