+ Reply to Thread
Results 1 to 5 of 5

Creating formulas for rows with dynamic range

  1. #1
    Registered User
    Join Date
    02-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    34

    Creating formulas for rows with dynamic range

    Hi all,
    Nice easy one for you!

    I'm copying a spreadsheet into another template. From there I want to run a macro to do various things. One of those things is to have the following formula for every cell in column B:
    Please Login or Register  to view this content.
    with the results displayed in say, column J.

    However, column B is dynamic in the number of rows it may contain.

    It's been a while since I've used VBA. I remember lines like 'Range("B65536").Select' and 'selection.End(xlUp)' but can't quite remember their context.

    Any help would be appreciated.

    Thanks.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Creating formulas for rows with dynamic range

    I always use
    Please Login or Register  to view this content.
    To find the row number of the last row containing data in Column B
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    02-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    34

    Re: Creating formulas for rows with dynamic range

    Thanks for the quick reply!

    However, I was hoping for a bit more help with the 'whole' code!!! It's been a while, and even then I was an extreme novice!

    How do I go about inserting my formula in the OP? I need that formula for every row with data.....

    Thanks again.

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Creating formulas for rows with dynamic range

    If you need the Formula inserting via a macro then
    Please Login or Register  to view this content.
    Its important to note the double quotes in the IF statement.

  5. #5
    Registered User
    Join Date
    02-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    34

    Re: Creating formulas for rows with dynamic range

    You sir, are a gentleman and a scholar.
    Thanks very much.
    Marked as SOLVED.

+ 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. Creating Dynamic Range Using OFFSET and COUNTA Adds Extra Rows
    By jcox1953 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2014, 12:44 PM
  2. Creating Dynamic Formulas
    By zerbaraa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-09-2014, 11:53 AM
  3. Want to autofill cells with formulas in a range with a dynamic numbe of rows
    By hgeo24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2014, 05:59 PM
  4. Insert cells, fill formulas down, set formulas for dynamic range
    By Snickers65 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 01:43 PM
  5. Dynamic Print Range not including blank rows with formulas
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2013, 11:49 AM
  6. [SOLVED] VBA to enter various formulas every 10 rows and show dynamic formulas not values
    By faby2203 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2013, 07:05 AM
  7. Replies: 0
    Last Post: 06-25-2012, 03:28 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