+ Reply to Thread
Results 1 to 9 of 9

How to make a formula move down one to a new row each.

  1. #1
    Registered User
    Join Date
    10-12-2015
    Location
    Vidalia, Ga
    MS-Off Ver
    2010
    Posts
    9

    How to make a formula move down one to a new row each.

    I have a "For" Loop that runs to help me in a scheduling program. Each 'For' until a specified Qty is reach copies & pastes a new line in a sequence of planning days, for example, planningday=1, then 2, then 3...until the set number is reached.

    I added the code to assign a "Day 1" when planningday =1, and "Day 2" when planningday =2. I have two problems though, I can not get my formula to replicate in subsequent cells, i.e. each line that is copied & pasted in should be assigned a "Day #" and also as it is set up now, the day changes bc the planningday cycles 1 through set #., so when it starts, it reads correctly, Day 1, but by planning day 4, it reads Day 4, when the top line should say Day 1...then Day 2...then Day 3...etc.

    This is the code:
    Please Login or Register  to view this content.
    The italicized lines are what I added, I think my logic is too simple for what I need it to do.

    EDIT **I hope this works. I've had issues trying to get help with this.
    Here is an overview of what is going on, the table in COL Schedule is updated in the first set of code, then a ranking is created in the second set of code. It is ranked by columns K divided by H, which creates a percent of Safety Stock, then that is sorted within the same code least amnt to highest. So that the Item number with the biggest gap between the % and 100% is ranked at the top.
    Then, Based on what is ranked at the top, the program pulls a batch size (based on information put into the tab ColSched Start Here) and says we will build that batch size., it copies & pastes (values only) that line with the Batch size (also known as BuildQty) into Columns Q ~ W . Then the bacth size is added to the Oh Qty in Column K, then the entire list is resorted and the process is repeated, until the desired daily rate is reached (also in Tab ColSched Start Here). Then the entire process is repeated for the specified # of days, 1 to 5 or something. In the example given batch size 18, daily rate 54, days planned 4, so each time 3 lines would be pasted it would move to the next planned day.
    If you watch Column X, listed as Day, you will see the value fills in based on what day is being planned, 1~4 or given #. what I need is an assigned "day 1", "Day 2", etc, to fill in each time a line is pasted, and the value must match the lines planned day not the current planned day.

    I'm horrible at explaining things, I hope this isn't too big a mess.**
    Attached Files Attached Files
    Last edited by BREECHEEZ87; 02-27-2017 at 03:17 PM. Reason: Broke Rules.

  2. #2
    Registered User
    Join Date
    10-12-2015
    Location
    Vidalia, Ga
    MS-Off Ver
    2010
    Posts
    9

    Re: How to make a formula move down one to a new row each... Please help.

    Also, when I tried to use the Paste formula right above my if statement, it kept selecting all the way tot he very bottom of the sheet, which is not what I needed it to do.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How to make a formula move down one to a new row each... Please help.

    Hi, welcome to the forum

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (I have added them for you - this time )
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: How to make a formula move down one to a new row each... Please help.

    Can you attach the file so we can look at the whole thing and step through the code to see what it's doing?

    In any event the code you italicized:
    Please Login or Register  to view this content.
    ... can be replaced with:
    Please Login or Register  to view this content.
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

  5. #5
    Registered User
    Join Date
    10-12-2015
    Location
    Vidalia, Ga
    MS-Off Ver
    2010
    Posts
    9

    Re: How to make a formula move down one to a new row each... Please help.

    I did this, but it didn't really fix anything for me... I did go back & edit my original post to include the worksheet

  6. #6
    Registered User
    Join Date
    10-12-2015
    Location
    Vidalia, Ga
    MS-Off Ver
    2010
    Posts
    9

    Re: How to make a formula move down one to a new row each... Please help.

    Thank you, I went back & read the rules too.

  7. #7
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: How to make a formula move down one to a new row each.

    I think this should do the trick ...
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-12-2015
    Location
    Vidalia, Ga
    MS-Off Ver
    2010
    Posts
    9

    Re: How to make a formula move down one to a new row each.

    This worked like a dream, I really appreciate the help. I just wish I knew how/why it worked. I feel like an idiot, with so little knowledge of VBA/Macros.

  9. #9
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: How to make a formula move down one to a new row each.

    You're very welcome - don't feel bad about it - I don't know how to fly a plane and I don't think I'm an idiot ... I've just not been trained as a pilot. Don't forget to mark the thread solved and click Add Reputation :-)

+ 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] Vlookup - how to make it move right to left
    By Deeintex in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-28-2015, 03:04 PM
  2. [SOLVED] Make button move when clicked
    By ed67 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2015, 09:02 AM
  3. how to make cells move
    By moley165 in forum Excel General
    Replies: 2
    Last Post: 08-17-2012, 06:31 AM
  4. Replies: 4
    Last Post: 01-25-2012, 03:18 PM
  5. how to make the TAB key move to a new row?
    By djkatt in forum Excel General
    Replies: 2
    Last Post: 08-29-2007, 10:58 AM
  6. Move values to make a list
    By Optitron in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2005, 04:05 PM
  7. [SOLVED] How to make command buttons move among worksheets?
    By Rick in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-21-2005, 01:05 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