Results 1 to 7 of 7

Thread: Conditional If statement?

Hybrid View

  1. #1

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Conditional If statement?

    This is a weird one, I am helping a friend with a spread sheet that tracks dollar amounts and who handled them basically.

    There is a collumn with names in it that have a dollar amount next to them. What we need is for Excel to add up all the dollar amounts in the range according to what name is in the corrisponding collumn.. This is what it lookes like kind of...

    I gott do this in VBcode tags or the spaces get jacked....
    VB Code:
    1. Name     Amount
    2.  
    3. John      $10,000
    4. Bill        $500
    5. Jody      $3,000        
    6. John     $100
    7. Jody      $50
    8.  
    9. Totals
    10. Name       Total Amount      Amount processed
    11.  
    12. John        $10,100               2
    13. Bill         $500                1
    14. Jody        $3,050                 2

    I could do this in VBA but he is not allowed to use VBA for whatever reasons, so this would have all be done with formulas.

    We already got the formula to count how many entries there are per name but I can't seem to figure out how the dollar amount could be added up into the total cell going by what name is in the other collumn.

    Any help is greatly appreciated, thanx, I will be reading up on the subject in the meantime. Thanx.
    Last edited by Spajeoly; Apr 21st, 2003 at 02:52 PM.

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Location
    CA,USA
    Posts
    17
    Since you can't make a custom formula with VBA, I think using an Excel pivot table will do the trick.

  3. #3

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    That's another problem, I asked if I could just make a new workbook to do the same thing but they want to keep the same design and refuse to change lol.

    My books are all at work, I will look through them tonight and see whatweird trick I might be able to figure out.

    Thanx for your reply.

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Location
    CA,USA
    Posts
    17
    Have your tried array formulas? Here's the exerpt from the Excel's Help. I've never used them, but it sounds like it might be what you are looking for.

    About array formulas and how to enter them

    An array formula can perform multiple calculations and then return either a single result or multiple results. Array formulas act on two or more sets of values known as array arguments. Each array argument must have the same number of rows and columns. You create array formulas the same way that you create basic, single-value formulas. Select the cell or cells that will contain the formula, create the formula, and then press CTRL+SHIFT+ENTER to enter the formula.

    If you want only a single result, Microsoft Excel may need to perform several calculations to generate that result. For example, the following formula averages only the cells in the range D515 where the cell in the same row in column A contains the text "Blue Sky Airlines". The IF function finds the cells in the range A5:A15 that contain "Blue Sky Airlines" and then returns the value in the corresponding cell in D515 to the AVERAGE function.
    {=AVERAGE(IF(A5:A15="Blue Sky Airlines",D515))}

  5. #5

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    That just might do it though I will have to experiment later on as I need to go to work right now due to unexpected changes in plans, I hate people who have no communication abilities....

  6. #6
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    I did put together an example using my EXCEL.
    Since I use it in GERMAN, I can't post the Formula.
    I hope you get it when you open it on your PC.
    Last edited by opus; Jul 18th, 2007 at 02:51 AM.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  7. #7

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Perfect man, perfect.

    Thanx a ton, I was going to tell him TS lol.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width