Results 1 to 8 of 8

Code to extend formula on changing ranges

Threaded View

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    27

    Code to extend formula on changing ranges

    Hi Experts,

    I am pretty new to VBA, I am trying to automate a task where I have to remove duplicates from my table, sort the table, insert a formula and change formula to consider all the cells within the table. So far I was able to complete 2/4 steps and was able to create a formula I am trying my best however I am stuck at one point where I have to "extend" formula in one cell to take account of all the newly added rows because next time when I paste the new table in my macro it may have more/less rows and based upon that I have to change my formula which is kept in one cell.

    I have also attached my working macro. I have added a separate tab called "Example" where I have outlined my steps. I am thinking the future process to be

    1. Paste the data table in "Input" Sheet of macro
    2. Run the macro and have result ready in cell F5 (Could be any cell) of "Input" sheet
    3. I also need to copy and paste this result in a single cell of master table's corresponding row however I do not bother anyone about this step - I will manage it

    If you paste the table (A3:C14) from "Example" sheet to A1 of "Input" sheet and run the macro1 you will see that I have removed duplicates+sorted the table based on column A. Can somebody suggest a code that would have updated formula in F5?

    I have very basic knowledge of programming

    Thanks for your time.
    Best,
    Bunty
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. A Challenge:Extend Code of a button to remove the Formula of the Saved Page and lock
    By ronettes in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2014, 06:01 AM
  2. How to extend a changing multi cell array formula down a column.
    By Patrician in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-12-2013, 07:07 PM
  3. Code for vlookup with changing ranges
    By trier in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-24-2012, 04:31 PM
  4. Changing ranges of current code
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2011, 01:42 PM
  5. Changing ranges of code
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-19-2011, 05:21 AM
  6. formula with changing cell ranges
    By db in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2005, 07:05 PM
  7. formula with changing cell ranges
    By Grant in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-23-2005, 02:05 PM

Tags for this Thread

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