+ Reply to Thread
Results 1 to 12 of 12

Format as function of results

  1. #1
    Registered User
    Join Date
    08-04-2006
    Posts
    55

    Format as function of results

    Hi guys

    I have come across an interesting problem. I am using the sumif formula to sum values that are input by a third party.

    A
    B
    Apple[IND £5[/INDENT]Pear[INDE £6[/INDENT]Apple[IND £4[/INDENT]Pear[INDE £10[/INDENT]
    In column B people can either enter a monetry amount or they can enter a percentage. They have to enter the amounts consistently so the list will only ever contain either £ or %.

    If i use the formula

    =SUMIF(A2:A6,"Apple",B2:B6)

    it works great when people enter the amounts with the £ but when people use the % the end result is 0.09 or similar. I want the formula to either end with 10 for currency or 2% for pecentage.

    Can anyone help?

    Thanks!

    Brokovich

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    I'ts not exactly clear from the post, but a cell can only be formatted once, either to monetary or percentage
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    08-04-2006
    Posts
    55
    Thanks Old Chippy

    Sorry about the garbled post, the formatting went a bit crazy.

    Basically I want to know if it is possible for the formula to insert a £ before the result if the amounts entered are in £'s, and a % after the result if the amounts entered are in %. Also, if it is in % then it would need to move the decimal place up two...

    Do you know if this is possible?

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    When you say values that are input by a third party presumably in column B, these cells must be formatted to either currency or percentage, it can't be both as all they are entering is numbers

  5. #5
    Registered User
    Join Date
    08-04-2006
    Posts
    55
    The cells are currently just formatted as general, so if they enter 10 it is taken to mean £10. If they want it to be a percentage then they have to actually enter the % sign themselves, ie 2%.

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    To get a total, ALL the values in column B must be currency OR percentages, just can't total a mixure of both

  7. #7
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Oldchippy is right ...

    Unless there is somewhere an indication of which format is to be applied, a potential event macro will never solve the issue ...
    HTH
    Carim


    Top Excel Links

  8. #8
    Registered User
    Join Date
    08-04-2006
    Posts
    55
    Hi guys

    that's right, there will only ever be one type in the list. This is a form people use to submit figures to me. Some people enter it as a number, others as a percentage, but any one list will only ever have either numbers OR percenatges. not both.

  9. #9
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Could you upload a zipped copy of your worksheet ...?

  10. #10
    Registered User
    Join Date
    08-04-2006
    Posts
    55
    I have attached a zipped copy of the sheet as an example.

    In cell C18 I want the formula result to show whether it has summed a percentage or not. in the range (D6:D11) the client will only ever enter either a currency amount or a percentage, it will never be a mixture of the two.

    Thanks again for your help!

    B
    Attached Files Attached Files

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    As I've said before you can't mix the two, so have a look at the attached, does that help?
    Attached Files Attached Files

  12. #12
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Another possibility ...
    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)

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