+ Reply to Thread
Results 1 to 11 of 11

Formula based on Contents of Particular Cell

Hybrid View

  1. #1
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    Formula based on Contents of Particular Cell

    Forumla needed based on Contents of a Particular Cell, Eg If Cell A1 Contains Apple Then Add A2 A3 & A4.

    Data Base

    ..............A (Name) ........B (Price) ..........C(Number Sold)...................D(Transport).............E(Total Cost)...........E (Apples Total)...........F(Orange Total)

    Row 1 ......Apple .............. £1.00 .............. 5 .......... .............................£1.00 .......................£5.00 .............. £6.00 ............ ................£0.00

    Row 2......Orange..............£1.00 .................1 ..........................................£1.00 ......................£2.00...................£0.00 ............................. £1.00

    Row 3......Apple ..............£1.00 ................2 ..........................................£2.00.......................£4.00....................£2.00..............................£0.00
    .


    Im looking for a formula that is looking for a specific Name or Number in a colum prior to competing the forumla. For example, If you as above you ahve Colum A Name, B item price, C Number Sold, D Transport Cost, E Total Cost, F Item Apples, G Item Oranges

    I would like a forumla in Colum F that Searches Colum A, If it finds the Text "Apple" it then uses standard Forumla to add up the Total Cost.

    I am trying to use this to abstract information easliy from a database containing multiple jobs, Each job has a specific job number and is entered onto the database in date format, this also needs to show cumlative project value. I have been manualy copying a formula into this colum for only the specific jobs. I am sure you will agree that a specific forumla which searches the cell for a text or number value would be the best way to go.

    Thanks in advance for all help!

    Regards

    Trevor
    Last edited by NBVC; 06-01-2010 at 12:53 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Formula Needed

    Please take a few minutes to reread the forum rules, and then amend your thread title accordingly.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    Re: Formula Needed

    ok Will do

  4. #4
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    Re: Formula Needed

    for some reason im not able to edit the thread title, can you explain how?

  5. #5
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    Re: Formula Needed

    want to chage the thread title to

    "Forumla needed based on Contents of a Particular Cell"

    Will this be in line with the Forum Rules?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Formula Needed

    Use the Edit button,then select Go Advanced
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    Re: Forumla needed based on Contents of a Particular Cell,Eg If Cell A1 Contains Appl

    Thanks for the advice, & Sorry for the infringement!

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

    re: Formula based on Contents of Particular Cell

    I think you are looking for SUMIF

    e.g.

    =IF($A$1:$A$10,"Apple",$B$1:$B$10)

    this sums B1:B10 where A1:A10 contains "Apple"

    Adjust cells and references as necessary

    Note: You can replace "Apple" in formula with a cell reference containing the word to search.
    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.

  9. #9
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    re: Formula based on Contents of Particular Cell

    I think this "If" command is what i need, however i have been unable to get it working on my spreadsheet. I have pasted your suggestion into Cell C1. If i have Apple in Cell A1, 5 in B1 from the forumla i would expect to See 5 in C1 as a result of the forumla All i get is #Value!

    This is slightly differnt to what i need, however if i can see where the sum forumla is i can add my own.

    For example Where i have

    A1 Name
    B1 Price
    C1 Number
    D1 Transport
    E Total Cost

    The Forumla in F1 Manualy would be =($B2*$C2)+D2

    What i want to do is use this "If" command and make it more automatic, I would like it to search for the word "Apple" in colum A, if found then use the forumla =($B2*$C2)+D2. (= Price X Number + Transport Costs) If anything else other than "Apple" is found then the cell have a value of "0"

    Thanks once more for your time and your help, it is greatly appreciated!

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

    re: Formula based on Contents of Particular Cell

    Is this on a line per line basis.. or are you wanting to multiply all occurences of Apple and corresponding B*C+D to get a grand total..

    so if Apple appears more than once in your list column F will have the same repeated result?

    or do you simply want:

    =IF(A2="Apple",($B2*$C2)+D2,0) copied down.

  11. #11
    Registered User
    Join Date
    12-07-2007
    Posts
    14

    re: Formula based on Contents of Particular Cell

    This works Perfectly, Many Many Thanks for your help.

    I think i need to do some reading. When i see forumla's working i understand them. Searching on the web and reading in books sometimes isnt as obvious as seeing it on a working document.

    Regards

    Trevor

+ 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