+ Reply to Thread
Results 1 to 5 of 5

trying to figure out how to get a total in one cell depending on a word I enter in another

  1. #1
    Registered User
    Join Date
    10-31-2014
    Location
    jennings, la
    MS-Off Ver
    2010
    Posts
    4

    trying to figure out how to get a total in one cell depending on a word I enter in another

    Hello,

    I created a spreadsheet that calculates trucking costs and disposal costs for my job. When I created it, we were only using one disposal company. Now, there are two and they have different prices. One column on my spreadsheet has the title "Disposal Used". If I type "Disposal 1" in a cell under that column, I need it to multiply by $100. If I type "Disposal 2" in that cell, I need it to multiply by $125. And my answer will go in another column that has the heading "Disposal Total". Any help would be greatly appreciated!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,797

    Re: trying to figure out how to get a total in one cell depending on a word I enter in ano

    Assuming your number (that you want multiplied) is in column A, and the Disposal 1 (or Disposal 2) is in column D, then you can use this formula (e.g. in F2):

    =A2 * IF(D2="Disposal 1",100,IF(D2="Disposal 2",125,0))

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: trying to figure out how to get a total in one cell depending on a word I enter in ano

    I need it to multiply by $100
    Multiply what by 100? Let's assume you put hours or whatever into column B, Disposal Used is in Column A

    Disposal Total = B2*IF(A2= "Disposal 1", 100, 125)
    Does that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    10-31-2014
    Location
    jennings, la
    MS-Off Ver
    2010
    Posts
    4

    Smile Re: trying to figure out how to get a total in one cell depending on a word I enter in ano

    YES! It works! You're so awesome! Thanks a bunch.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,797

    Re: trying to figure out how to get a total in one cell depending on a word I enter in ano

    Glad to hear it.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA code to tell an object to change colour depending on figure in cell
    By Muzza86 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-29-2014, 07:29 AM
  2. Replies: 1
    Last Post: 06-22-2012, 10:54 AM
  3. Macro to enter the word Total in column A
    By daillest319 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2012, 04:32 PM
  4. add to total depending on cell value
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-21-2011, 06:16 AM
  5. Replies: 8
    Last Post: 06-20-2008, 08:01 AM

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