+ Reply to Thread
Results 1 to 7 of 7

question

  1. #1
    Registered User
    Join Date
    11-28-2007
    Posts
    3

    question

    I have a table - in one column I have days I worked - it doesnt come in order - which means - sun, wed, fri, thu, sun, sat ... etc.
    this column is endless.
    in the second column I have a number 5,7,7,6,3,9 etc ...
    I want that the function will look for all the "sun" days and will SUM all the numbers near. how do I do that ?

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Use the SUMIF function - excel help describes it well

    Ed

  3. #3
    Registered User
    Join Date
    11-28-2007
    Posts
    3
    thanks, but SUMIF has nothing to do with it.
    again - I need a function that will look which number has near "sun" and add it to the next one. for example:

    sun - 3
    mon - 5
    fri - 6
    sun - 9
    thu - 2
    sun - 6

    the function will look for all the "sun" - and SUM it to - 3 + 9 + 6 =

  4. #4
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Oh yes it does

    for example, if your days are in col A and the hours in col B and your data extends A2 to A30 then

    =SUMIF(A2:A30,"sun",B2:B30)

    will sum all the entries that are next to "Sun".

    or maybe i have misunderstood you and you want to do something different?

    Ed

  5. #5
    Registered User
    Join Date
    11-28-2007
    Posts
    3

    Thumbs up

    you are damn right !!

    I was using a formula that look like:
    =SUMPRODUCT((INDIRECT("$B$10:$B$"&COUNTA($B:$B))=$B2)*(INDIRECT("C$10:C"&COUNTA($B:$B))))
    and I see now that it is not true ... I'm stunned !

    THANKS

  6. #6
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi krayot,

    that's OK - it's quite often a case of not being able to see the wood for the trees.

    The old KISS adage (keep it simple, stupid) often applies!

    Glad you are sorted - feel free to post back if you have any more problems.

    Ed

  7. #7
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    krayot

    Please read forum rules (rule 1) & use suitable thread titles

    A thread with the rules is available at the top of each forum or see link below for rules
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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