+ Reply to Thread
Results 1 to 13 of 13

IF function issue

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    Boca Raton, FL
    MS-Off Ver
    Excel 2010
    Posts
    11

    IF function issue

    Hello all,
    I'm new to excel and have been teaching myself slowly to help with some tasks I'm faced with at work.

    I'm working on a table right now.
    Column A has different types of carriers (A1=broadcast, A2=government, A3=Data, etc)
    Column B is where i'd like to put the $ amount of rent that each different type of carrier pays

    I tried =If(A1="broadcast", 350) ...and that works, but how do I create a formula where if A1= broadcast B1 will equal $350 or if A1=government then B1=250

    I tried =IF(OR(F2="broadcast",350),OR(F2="government",250)) but it keeps returning TRUE.

    I also tried doing =IF(or(and....but that didn't work either.

    can anyone fix my formula and also explain why it works that way and not how I'm doing it?

    thank you so much!!
    Last edited by mbeyatli; 03-04-2014 at 11:31 AM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,526

    Re: Not sure which function to use

    Hi mbeyatli and welcome to the forum.
    Please check the forum rules especially the one about titles.
    http://www.excelforum.com/forum-rule...rum-rules.html
    1. Use concise, accurate thread titles. Your post title should 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 the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more days have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,526

    Re: IF function issue

    from what you wrote it looks like you simply are approaching it wrong.
    look at this for example...
    =IF(A496="broadcast",350,IF(A496="government",250,450))
    and thanks for changing the title BTW.

    EDIT: I just used my own examples, yours of course will differ.

  4. #4
    Registered User
    Join Date
    02-20-2014
    Location
    Boca Raton, FL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: IF function issue

    wow I feel very dumb now haha. that was such a simple fix! thank you soooooooo much!!!!

  5. #5
    Forum Contributor
    Join Date
    12-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: IF function issue

    try this formula in cell B1 and you should be able to drag it down

    =IF(A1="broadcast", 350,IF(A1="government", 250,if(A1="data", 150, "no change")))

    http://www.easyexcelanswers.com

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,526

    Re: IF function issue

    You're welcome. Glad it helped. BTW, since you're new to the forum a little clean up that the moderators usually request is to mark the post as solved (if you haven't already).
    You can do that using the thread tools at the top of the post.
    AND, thanks for the bump to my reputation. Visit again!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,118

    Re: IF function issue

    There are several ways, depending on how long your list of carriers is:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    For the last option, you need to make a list of the carriers and their rates ... in this case, cells H1:I3.

    It has the advantage that is is more flexible and you can add entries if you need to.

    If you make the list into a Named Range, say, CarrierTable, you can use:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And you can convert the list to a Table and then Excel will manage the Named Range so you can add entries. The most flexible option.

    See the attached sample workbook.


    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  8. #8
    Registered User
    Join Date
    02-20-2014
    Location
    Boca Raton, FL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: IF function issue

    one more question...i noticed some carriers have the same rent amount. How would i manipulate the formula to say if A1=government or utility, rent equals x

    i tried =IF(F3="broadcast",1318,IF(F3="government",908,IF(OR(F3={"other","utility","tower company"},939),IF(F3={"data","wireless internet"},985,IF(F3="two way",346,IF(F3="paging",540))))))

    the value for "other" comes up but when i have utility or Tower Company it says false.

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,526

    Re: IF function issue

    I've not always had luck when using the {} in formulas (outside of array formulas). So that being said, maybe a list of things you want then a vlookup formula would work better for you?

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,526

    Re: IF function issue

    But, I think this part IF(OR(F3={"other","utility","tower company"},939) is written wrong and should be =IF(OR(F3={"other","utility","tower company"}),939,"") instead.

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,526

    Re: IF function issue

    As for the government or utility, that would be where you want to put the IF(OR(F3="government","Utility"),blah blah. Hopefully that helps.

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,118

    Re: IF function issue

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,118

    Re: IF function issue

    HTML Code: 

    Regards, TMS

+ 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. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  2. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  3. [SOLVED] Using Offset function as the array in the PercentRank function is giving wrong result
    By Bobneil in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-06-2013, 09:29 PM
  4. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  5. Replies: 2
    Last Post: 03-20-2009, 01:29 PM

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