+ Reply to Thread
Results 1 to 9 of 9

formula to return value of several rows + columns

  1. #1
    Registered User
    Join Date
    06-07-2006
    Posts
    57

    formula to return value of several rows + columns

    Hi,

    I hope someone can help me with what I am sure is a simple formula.

    I need the ‘Summary’ in column ‘S’ to look in the ‘artist ref’ in column ‘D’ and count how many SM002’s there are at A2 size (column H). I would like the summary to return this for each of the artist references

    To make sense of all this it is a summary of poster sizes per image – as the print costs are cheaper to print lots of an individual image I need to work out how many of each image per size, I know there will be a way in excel to do this but can’t figure out how!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: formula to return value of several rows + columns

    First, change AA5 to Industrial Frame. Then in T6

    =SUMPRODUCT(--(INDEX($G$6:$O$54,,MATCH(T$5,$G$2:$O$2,0))),--($D$6:$D$54=$S6))

    Dragged across and down. This gives for SM002;
    A0 0
    A1 4
    A2 6
    White Box 0
    Black Box 0
    White Slim 0
    Black Slim 1
    Industrial Frame 5
    Is that what you were looking for?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: formula to return value of several rows + columns

    I think you want:
    =SUMIF($D:$D,$S6,G:G)
    in T6, rather than write two formulae, it would be a good idea to remove that spacer column at J.

    You can copy the formula I've given you across for sizes, and down if you add more references in S.

    The better way of doing this would be a pivot table, but I'd rather not describe it if you aren't interested in a bit of extra legwork (to me it's worth the power and flexibility of a pivot table)

    hth
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  4. #4
    Registered User
    Join Date
    06-07-2006
    Posts
    57

    Re: formula to return value of several rows + columns

    Hi, thank you both for these it is exactly what i am looking for. The only other part would be for Column S to look for the image ref in column D so it only returns 1 instance of each, do you know how I would do this?

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: formula to return value of several rows + columns

    A pivot table would be the best way (by a long way).

    Creating a unique filter of column D would be an alternative (a cheap and lazy one).

  6. #6
    Registered User
    Join Date
    06-07-2006
    Posts
    57

    Re: formula to return value of several rows + columns

    Quote Originally Posted by Cheeky Charlie View Post
    A pivot table would be the best way (by a long way).

    Creating a unique filter of column D would be an alternative (a cheap and lazy one).
    Thanks Charlie, I will look into pivot tables but can you help me with a quick fix for now?

  7. #7
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: formula to return value of several rows + columns

    No probs
    You need to type something into D5 so Excel can identify a heading (I typed Artist Ref)
    Select the data in column D
    Alt, d, f, a
    Copy to another location
    Copy to S5 (you will need to clear the contents of S5 first)
    Unique records only

    Done

    I admit I've done it a few times before, but it takes me less time to create an operational pivot table than to run through these steps and create the appropriate formulae (pivot tables don't need formulae).
    Last edited by Cheeky Charlie; 09-15-2010 at 04:40 AM.

  8. #8
    Registered User
    Join Date
    06-07-2006
    Posts
    57

    Re: formula to return value of several rows + columns

    Quote Originally Posted by Cheeky Charlie View Post
    No probs
    You need to type something into D5 so Excel can identify a heading (I typed Artist Ref)
    Select the data in column D
    Alt, d, f, a
    Copy to another location
    Copy to S5 (you will need to clear the contents of S5 first)
    Unique records only

    Done

    I admit I've done it a few times before, but it takes me less time to create an operational pivot table than to run through these steps and create the appropriate formulae (pivot tables don't need formulae).
    sorry Charlie it is not recognising the Alt, d, f, a when I select the data column D (it is just entering Alt, d, f, a into the first cell) - I do have a mac so the shortcut may be different?

  9. #9
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: formula to return value of several rows + columns

    You are looking for 'advanced filter' (something like data->filter->?advanced/custom? - I don't have a mac)

    hth

    (It would help if you put your Excel version into your profile - I wrote the keyboard shortcut because that works in Excel 2000-03-07&10 - but not 08)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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