+ Reply to Thread
Results 1 to 3 of 3

Syntax for filldown based on another rows length and specific filter

  1. #1
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    Syntax for filldown based on another rows length and specific filter

    Hi, I am looking for how you set up a range and use it to fill down based on another rows length.

    For example, If I know column A will always be my longest column, and all my formulas are in row 2, how can I list filldown ranges efficiently.

    For example, could I do B2:D2 and E2:G2 at once (anything with a break in between, or do I need to list them separate, can I even do continuous groups together, or is it row by row? Thanks, quite new to VBA, trying to learn the syntax to write them myself, since record a macro seems to record keystrokes for the most part (it will say this row to that row instead of determining the last used cell etc.)

    Another one that's been troubling me is how to reference a specific value in a filter rather than its relative reference in a list.

    Thanks in advance!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Syntax for filldown based on another rows length and specific filter

    Try something like this...

    Please Login or Register  to view this content.
    There are a couple of methods to determine the last used row depending on your circumstance. Do a web search for something like Excel VBA last used row and you'll find many useful guides and tutorials.

    The same for defining ranges (both contiguous and non-contiguous) in VBA; there are more than one method. Some functions require only one contiguous range . Others can process multiple noncontiguous ranges. It just takes experience or a little trial and error to figure it out.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    Re: Syntax for filldown based on another rows length and specific filter

    Thanks, that is just what I was looking for. So you can list multiple ranges separated by a column, and if we define the range like that, it is referenced as so.

    Very helpful, can't thank you enough.

+ 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. Delete rows of varying length in sheets with specific names
    By k0st4din in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-02-2015, 03:44 PM
  2. [SOLVED] Filter rows based on unique values in one column + specific value in another column
    By Dieneces in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2013, 09:55 AM
  3. Copy and paste list with varying length to specific columns/rows
    By bruizer31 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 08:32 PM
  4. Macro to filldown rows
    By divkar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-25-2010, 11:13 AM
  5. Filter and FillDown
    By jad70 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2009, 08:44 AM
  6. Delete rows based on unique syntax
    By tzflorida in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2009, 02:59 PM
  7. Variable Range Length & .FillDown?
    By Jason Paris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2006, 03:10 AM

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