+ Reply to Thread
Results 1 to 5 of 5

Problem With Formula

  1. #1
    Registered User
    Join Date
    09-30-2015
    Location
    Bedford, VA
    MS-Off Ver
    Office 2015
    Posts
    1

    Post Problem With Formula

    I am trying to use the IF function to calculate a sales tax rate. We have three different locations. One is Bedford, one is Tidewater, and one is Richmond. The sales tax rate for Tidewater is 6%, and Bedford and Richmond are 5.3%.

    I have a drop down box in a cell asking what branch. You select one of the three. Down in the bottom of the spreadsheet, I have a cell for the tax that is supposed to multiply the amount of a cell and the sales tax rate. I want the sales tax cell to automatically pick the right sales tax based on which branch is selected above. My formula looks like this:

    =IF(B3="Bedford", E37*5.3%)=IF(B3="Richmond", E37*5.3%)=IF(B3="Tidewater", E37*6%)

    In that cell, all it says is TRUE, so I'm assuming the formula is incorrect. Can someone please help me with this. First time user here, once I learn some more I will help others!

    Take care,

    Mark Stephens

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Problem With Formula

    I think you probably want

    =IF(B3="Bedford", E37*5.3%,IF(B3="Richmond", E37*5.3%,IF(B3="Tidewater", E37*6%)))

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

    Re: Problem With Formula

    =IF(B3="Bedford", E37*5.3%, IF(B3="Richmond", E37*5.3%,IF(B3="Tidewater", E37*6%,"N/A")))

    Can be simplified to
    =IF(OR(B3="Bedford", B3= "Richmond"), 5.3%, IF(B3 = "Tidewater", 6%))* E37

    or even, assuming only Richmond, Tidewater or Bedford will be in B3

    = IF(OR(B3 = {"Bedford", "Richmond"}), 5.3%, 6.0%) * E37
    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
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Problem With Formula

    Actually, if B3 is only 1 of 3 values, we really only need to test if B3 = "Tidewater" (the one that's different from the other 2)
    If it's NOT Tidewater, it therefore must be one of the other 2.

    =IF(B3="Tidewater",6%,5.3%)*E37

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

    Re: Problem With Formula

    Good point Jon. My brain is thinking left to right again.

+ 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. Formula Problem
    By paulman1976 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2014, 08:53 AM
  2. Replies: 1
    Last Post: 01-06-2014, 03:54 AM
  3. Replies: 7
    Last Post: 02-03-2013, 06:25 PM
  4. Replies: 2
    Last Post: 01-22-2013, 07:09 AM
  5. Formula problem...
    By SportyJim1979 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2012, 03:53 AM
  6. Problem reading formula with ActiveCell.Formula
    By Matija in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2011, 06:10 AM
  7. Formula problem
    By superkopite in forum Excel General
    Replies: 8
    Last Post: 01-27-2006, 05:15 PM
  8. Formula Problem
    By nospaminlich in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-02-2005, 06:15 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