+ Reply to Thread
Results 1 to 4 of 4

Help with Index formula - potentially combined with a count formula

  1. #1
    Registered User
    Join Date
    08-19-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    2

    Help with Index formula - potentially combined with a count formula

    Hi There,

    This is my first post to the forum, I've searched the forums and I believe that the Index formula is the solution I am after, however I'm stuck with how to repeat the formula automatically with the correct results.

    Below is the source data:

    Emp Num Emp Name Check Pay 1 $ Pay 2 $ Pay 3 $ Pay 4 $
    001234 Employee 1 Correct 29-Feb-16 1445.40 31-Mar-16 3022.20 30-Apr-16 2759.40 31-May-16 657.00
    003456 Employee 2 Correct 31-Jan-16 262.80 29-Feb-16 2759.40 31-Mar-16 3022.20 30-Apr-16 1839.60
    008976 Employee 3 Correct 29-Feb-16 2102.40 31-Mar-16 3022.20 30-Apr-16 2759.40 0-Jan-00 0.00

    The results I want is below (repeat employee number 4 times, once for each pay period and have the pay end and $ figure):

    Emp Num Pay Period $
    001234 29-Feb-16 1445.40
    001234 31-Mar-16 3022.20
    001234 30-Apr-16 2759.40
    001234 31-May-16 657.00
    003456 31-Jan-16 262.80
    003456 29-Feb-16 2759.40
    003456 31-Mar-16 3022.20
    003456 30-Apr-16 1839.60
    008976 29-Feb-16 2102.40
    008976 31-Mar-16 3022.20
    008976 30-Apr-16 2759.40
    008976 0-Jan-00 0.00

    I can get the index formula to bring back the first result, however when I move to the next line it does also, but I want it to move every 4th line for the employee number.

    The formulas I've attempted are below:

    Emp Num
    =INDEX($A2:$K2,1,1)
    Pay Period
    =INDEX($A2:$K2,1,4)
    $
    =INDEX($A2:$K2,1,5)

    Which gives the below results:

    Emp Num Pay Period $
    001234 29-Feb-16 1445.40
    003456 31-Jan-16 262.80
    008976 29-Feb-16 2102.40
    000000 0-Jan-00 0.00

    I'm thinking a count needs to be used somehow, but I'm stuck as to how to implement. I've attached the sample document.

    Can anyone help?

    Thanks,

    Richie
    Attached Files Attached Files

  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,724

    Re: Help with Index formula - potentially combined with a count formula

    Put these formulae in the cells stated:

    A8: =INDEX($A$2:$K$4,INT((ROWS($1:1)-1)/4)+1,1)

    B8: =INDEX($A$2:$K$4,INT((ROWS($1:1)-1)/4)+1,MOD(ROWS($1:1)-1,4)*2+4)

    C8: =INDEX($A$2:$K$4,INT((ROWS($1:1)-1)/4)+1,MOD(ROWS($1:1)-1,4)*2+5)

    Then copy down to row 19.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    08-19-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    2

    Re: Help with Index formula - potentially combined with a count formula

    Perfect! Thanks Pete_UK this is exactly what I was after.

    Thanks for the quick response.

    Richie

  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,724

    Re: Help with Index formula - potentially combined with a count formula

    You're welcome, Richie - thanks for feeding back.

    Pete

+ 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. Combined count if and index match
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2016, 12:00 PM
  2. seeking a combined 'index' / vertical lookup with two citeria - formula
    By nielsb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-20-2015, 04:54 PM
  3. Issue with sumproduct formula combined to INDEX MATCH
    By St3ff3ns in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-07-2015, 06:30 AM
  4. VBA - Index formula to be combined using IFERROR
    By gan_xl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2014, 06:15 AM
  5. vlookup formula and function to combined with another formula
    By Miss Niki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2014, 12:03 PM
  6. [SOLVED] Combined INDEX and MATCH formula will not work - pls help!
    By Postlki1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-06-2013, 08:03 AM
  7. Replies: 3
    Last Post: 10-31-2008, 02:23 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