+ Reply to Thread
Results 1 to 6 of 6

Setting range to every nth cell in a column

  1. #1
    Registered User
    Join Date
    01-11-2015
    Location
    Portland, OR
    MS-Off Ver
    2010
    Posts
    4

    Setting range to every nth cell in a column

    I am trying to loop goal seek every 29th rows in Column D starting with row 15.

    With a lot of trial and error and web searching, I figured out how to set the goalseek function to the proper variable cells, but now I'm stuck at how to efficiently set my range.

    This is what I have:

    Please Login or Register  to view this content.
    I can of course manually set my range to all the individual cells (D15, D44, D73, D102, etc) all the way to the final cell, D2886, but that is both tedious and far too static. I need to be able to change the range criteria more easily to accommodate future updates to the page.

    Any suggestion is appreciated. Thanks!

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Setting range to every nth cell in a column

    Hi 8xInfinity

    Play with something like this...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    01-11-2015
    Location
    Portland, OR
    MS-Off Ver
    2010
    Posts
    4

    Re: Setting range to every nth cell in a column

    Thank you, but this seems to be having some problems. It says "Run-time error '13': Type mismatch". GoalSeek is a bit picky about what it will cooperate with. So far cll and range are the ones it seems to like the best

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Setting range to every nth cell in a column

    Hi 8xInfinity

    Well then let's Dim the Variables and see what happens...it Compiles...
    Please Login or Register  to view this content.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Setting range to every nth cell in a column

    Here's another thought (keep in mind, I've never used Goal Seek)...

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-11-2015
    Location
    Portland, OR
    MS-Off Ver
    2010
    Posts
    4

    Re: Setting range to every nth cell in a column

    Hmm, still no luck. It really is a pretty uncooperative function. I've found a few ways to make it work in different circumstances (making the value and changing cell into dynamic ranges took some trial and error), but creating a custom range that it will play nice with is proving extra tricky.

+ 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] Setting a range as a column rather than a cell
    By kmlloyd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-24-2015, 07:25 PM
  2. [SOLVED] Help with setting Column Range to remove string with VBA
    By isritter in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-20-2014, 01:19 PM
  3. [SOLVED] Trouble Setting Range wit h a Varaible Column
    By CGriffiths1214 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2013, 12:26 PM
  4. [SOLVED] ListBox Column and Range setting
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2013, 12:02 PM
  5. setting a range value for a cell
    By slighty116 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2012, 07:40 PM
  6. Setting a column range
    By CFryer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2009, 04:16 PM
  7. Range - setting a value in a cell
    By cantonarv in forum Excel General
    Replies: 1
    Last Post: 11-22-2005, 10:25 AM

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