+ Reply to Thread
Results 1 to 25 of 25

Summing with Variables

  1. #1
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Summing with Variables

    Morning all

    I am having real trouble with a formula.

    I have used a similar formula for to calculate a column.

    Can any one see where I am going wrong. It is the cell highlighted in yellow on the attached spreadsheet.

    Thanks in advance.

    Bud
    Attached Files Attached Files
    Last edited by NBVC; 02-22-2010 at 12:22 PM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Help!!

    You haven't attached anything. Also you will probably get a telling off from a mod about your thread title.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Help!!

    Domski's right!

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Help!!

    There doesn't appear to be a formula in the highlighted cell now.

    Dom

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Help!!

    Dom .....! I'll put that down as simultaneous posting before seeing the mod request.

  6. #6
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Help with formula.

    Sorry all my bad. I got caught up in the heat of the moment. I have re-uploaded the file with the formula and edited the title.

    Sorry again

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Help with formula.

    I have re-uploaded the file with the formula and edited the title.
    Could you check that again, please?

  8. #8
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Help with formula.

    Maybe:

    =SUMPRODUCT(COUNTIF($B$1:$AG$1,{"HH","HS","HO"})*0.5)+SUM($B$1:$AG$1)

    Dom

  9. #9
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Help with formula.

    Spreadsheet with formula in yellow highlighted cell

    3rd time lucky

    Attached Files Attached Files

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with formula.

    I think Teylyn means.. check the title... please read Rule 1 of the Forum Rules.. the title should be a brief description of the problem.. not help, not formula....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  11. #11
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Help with formula. '=SUMPRODUCT'

    Hi Dom

    Thanks for the reply

    Tried that and still getting N/A.

    Hopefully I have correct the title for the thread now

  12. #12
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Help with formula. '=SUMPRODUCT'

    I get 28 rather than #N/A.

    Dom
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    Copy and pasted it and now works. I must have made a typo.

    Thanks Dom you the man

  14. #14
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    Hi again all

    I have tried to use a simular formula again but I it is not working again.

    I have attached screen shot of the sheet, error and formula

    Can amyone see where I am going wrong?

    Cheers people.
    Attached Images Attached Images

  15. #15
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Summing with Variables

    You can't specify multiple or non-contiguous ranges in a COUNTIF formula.

    Dom

  16. #16
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing with Variables

    Separate into 3 separate COUNTIF functions for the 3 different ranges.. then add the SUM() part

  17. #17
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    Any chance of an example. Tried it a number of times over the weekend but just not getting anywhere.

    My brain hurts

    cheers people

    bud

  18. #18
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing with Variables

    Since you have single references, try:

    Please Login or Register  to view this content.

  19. #19
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    Hi NBVC

    Thanks for that.

    I have put that formula in but I am getting a total of 22. I should be getting a total off 7.5. I can't quite see where I am going wrong.

  20. #20
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing with Variables

    Please attach actual worksheet showing the problem... not a .jpg file... an .xls file please.

  21. #21
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    Hi

    Attached is the sheet.

    cell AO20 should have a total of 7.5 not 22. The formula look ok to me but it does go over my head a bit.

    Cheers

    bud
    Attached Files Attached Files

  22. #22
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing with Variables

    Misplaced a bracket or two...Try:

    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    Thanks again.

    Last query I promise.

    If I put 0.5 on one for the cells for example E20. It doesn't calculate it in AO20 :S any ideas

    I wished I hadn't started this sheet now lol.

  24. #24
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing with Variables

    When I put 0.5 in E20, AO20 changed to 7.0 (from 7.5). Not right?

  25. #25
    Registered User
    Join Date
    07-03-2009
    Location
    Kent, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    48

    Re: Summing with Variables

    NBVC!!!

    My bad. It is working like a dream.

    Thank you so much for all your help.

    Bud

+ 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