+ Reply to Thread
Results 1 to 5 of 5

Returning a name to a summary sheet

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Returning a name to a summary sheet

    Hi All

    I need some help with a formula that would return a contract name to a summary sheet however it is complicated due to the way the data is laid out.

    I am hoping either a formula can do this but a pivot table would be ok if this can be done on multiple ranges.

    On the summary sheet I have two columns for each BU (Contract and Overhead). If in columns F,O or X it contains a “C” then it would need to go to column D of the summary sheet or if it contains a “O” then it would need to be returned to column E.

    The problem I have is that I have empty rows in the data which need to be ignored.

    On the attached example I have populated what I need – I have done this manually.

    Can anyone help at all?
    Attached Files Attached Files

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Returning a name to a summary sheet

    If you were to re-arrange your horizontal arrangement of data to a vertical arrangement even with spaces between the sections, this will work.
    Sample formula for Summary!D5 array entered (Ctrl + Shift + Enter) and filled down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To Get the overheads, use the same formula in Summary!E5 but change the C to O and fill down (enter with Ctrl + shift + Enter)
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

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

    Re: Returning a name to a summary sheet

    I've assumed that you couldn't (or didn't want to) change the layout of the data in the BU sheets, so I've used columns A, J and S in those sheets as helper columns to give each record a unique identifier. Each of those columns has a starting value for the C and O status in rows 13 and 14, so in A13 and A14 these are both set to zero, and then J13 contains this formula:

    =COUNTIF(F:F,K13)+A13

    which can be copied into J14 and both can be copied into S13/S14. I've used this formula in A17:

    =IF(F17="","-",F17&"_"&COUNTIF(F$17:F17,F17)+IF(F17="C",A$13,A$14))

    which has been copied down to row 40, then that block of formula can be copied across into J17 and S17 to give the unique references (coloured blue, to help identify them more clearly). This has been done in both BU sheets.

    In the Summary sheet I pasted the values that you had in the two tables across to the right for comparison, then used this formula in D5:

    =IFERROR(INDEX('BU1'!$C:$U,MATCH(LEFT(D$4)&"_"&ROWS($1:1),INDEX('BU1'!$A:$T,,MATCH(ROWS($1:1)-1,'BU1'!$13:$13)),0),MATCH(ROWS($1:1)-1,'BU1'!$13:$13)),"")

    and a very similar formula in E5:

    =IFERROR(INDEX('BU1'!$C:$U,MATCH(LEFT(E$4)&"_"&ROWS($1:1),INDEX('BU1'!$A:$T,,MATCH(ROWS($1:1)-1,'BU1'!$14:$14)),0),MATCH(ROWS($1:1)-1,'BU1'!$14:$14)),"")

    The only change (shown in red) is that you want to look at row 14 instead of row 13.

    Similar formulae can be used in G5 and H5 - the difference here being that you need to look in the BU2 sheet rather than the BU1 sheet.

    These formulae were then copied down to row 33.

    Hope this helps.

    Pete
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Returning a name to a summary sheet

    Hi

    Thank you both for replying. Both formulas and examples you provided worked just how they should – thank you!

    @Newdoverman – sadly I couldn’t rearrange the data. I am not the owner of the spreadsheet, just been asked to take a look and so I couldn’t change it. In the main model it has lots of other tabs and rows which feeds other models so it wouldn’t be easy to change.

    @Pete – thank you for this. I like the concept and I couldn’t think of how to lay it out.

    Im going to try and replicate this now in my main model

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Returning a name to a summary sheet

    ok here is a solution that uses your layout on BU1 AND BU2 and creates a summary on the Summary worksheet. All formulae are entered with Ctrl + Shift + Enter.
    Enter in D5 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter in E5 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter in G5 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter in H5 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    All these formulae address to row 100 on BU1 and BU2.
    Attached Files Attached Files

+ 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] Returning a summary table of none productive periods in a year
    By saifsawafi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-10-2016, 03:47 AM
  2. Creating Summary sheet - VLOOKUPS/INDEX Returning Multiple Values
    By kelsrae in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2014, 05:09 PM
  3. [SOLVED] Summary sheet - copy cell contents from multiple sheets to one summary sheet
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 10:32 AM
  4. Create a summary from multiple sheets on a master/summary sheet
    By detribus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2012, 08:04 PM
  5. Populate summary sheet (insert & index rows from info in columns on another sheet)
    By DerbysGal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2011, 01:54 PM
  6. Codefor returning results to summary sheet
    By LovenLust72 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2009, 07:27 AM
  7. count summary in Summary Sheet
    By joeBite in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-04-2007, 03:55 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