+ Reply to Thread
Results 1 to 5 of 5

Creating an incremental formula whilst using data from a second sheet

  1. #1
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    3

    Creating an incremental formula whilst using data from a second sheet

    Hi guys

    I was hoping to get some help with a formula I'm trying to use, now I have the formula right and it works, however when i drag it across my range of cells rather than incrementing as cell d1, d2, d3, d4, d5, d6, d7, d8, it will just repeat d1,d2,d1,d2,d1,d2

    The code im currently using looks like this:


    cell 1
    Please Login or Register  to view this content.
    cell 2
    Please Login or Register  to view this content.
    As mentioned when I drag the sheet across the d7/d8 and f7/f8 just keep repeating rather than incrementing. I have played around with the $ as well but still no luck

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,839

    Re: Creating an incremental formula whilst using data from a second sheet

    Put this in your first cell:

    =IF(H$5<=H$1,INDEX('MASI Timesheet'!$D:$D,COLUMNS($A:G)),INDEX('MASI Timesheet'!$F:$F,COLUMNS($A:G)))

    then you can copy this across to your heart's content.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    3

    Re: Creating an incremental formula whilst using data from a second sheet

    Hi Pete

    This has worked fantastically! Thank you, if you have a second could you break it in pseudo code for me so I can better understand it

    thanks in advance

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,839

    Re: Creating an incremental formula whilst using data from a second sheet

    The important parameter is the COLUMNS($A:G) term - this initially returns the value 7 (i.e. the number of columns between A and G), but when the formula is copied across the term changes to COLUMNS($A:H), COLUMNS($A:I) and so on, which return the values 8 and 9 respectively. These are the cells within column D and column F that you want to include within your formula, and the INDEX functions thus return the equivalent of D7/F7, D8/F8, D9/F9 etc. in successive columns.

    Hope this helps.

    Pete

    P.S. If that takes care of your original question, please take a moment to select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  5. #5
    Registered User
    Join Date
    11-30-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    3

    Re: Creating an incremental formula whilst using data from a second sheet

    Thanks again Pete, that's been very helpful for my understanding. Rep added.

+ 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. Replies: 2
    Last Post: 05-19-2016, 03:49 PM
  2. Replies: 7
    Last Post: 01-21-2016, 09:10 PM
  3. [SOLVED] Help creating a formula to pull data from one sheet into another
    By Seeki in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-27-2015, 09:14 PM
  4. Showthe sheet's calculating percentage whilst full screen
    By tlacloche in forum Excel General
    Replies: 2
    Last Post: 01-21-2014, 08:47 AM
  5. [SOLVED] Autofill Row (whilst skipping every other cell), using column from another sheet
    By shadypops in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2013, 03:26 PM
  6. [SOLVED] Incremental copying of data from one sheet to another
    By Trompie in forum Excel General
    Replies: 8
    Last Post: 05-21-2012, 12:07 AM
  7. Reference a cell from an another sheet which is incremental
    By pad5 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-25-2008, 11:08 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