+ Reply to Thread
Results 1 to 7 of 7

Selecting if formulas based on column value

  1. #1
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Arrow Selecting if formulas based on column value

    Hello,

    I am trying to have multiple formulas used for different values entered.

    I have a dropdown list column with the values of "AB" and "ON" in F14.

    A user will enter a numeric value in E14 and I want it so that if E14 ONLY has the value of 1 or 2 the following formula will execute in G14

    =IF(F14="AB",D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2))

    OR if E14 equals 3 then I want =IF(F14="AB", D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2))
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Selecting if formulas based on column value

    if(or(E14=1,E14=2),IF(F14="AB",D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2)),if(E14=3,IF(F14="AB", D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2)),"")
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Selecting if formulas based on column value

    I dont really see any difference between the 2 formulas?

    <3=IF(F14="AB",D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2))
    3 =IF(F14="AB",D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2))

    The suggestion in #2 could also be shortened to...
    if(E14<3,IF(F14="AB",D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2)),if(E14=3,IF(F14="AB", D14/1.04*0.04/2,IF(F14="ON",D14/1.12*0.12/2)),"")

    Again though, I dont see the difference?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Selecting if formulas based on column value

    Thank you it works!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Selecting if formulas based on column value

    Happy to help and thanks fior the feedback

    Still curious about what the difference is supposed to be (and which formula you ended up using?)

  6. #6
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Selecting if formulas based on column value

    Quote Originally Posted by FDibbins View Post
    Happy to help and thanks fior the feedback

    Still curious about what the difference is supposed to be (and which formula you ended up using?)
    I used your formula. The two formulas are the same just need to execute them when a certain value is entered.

    Thanks!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Selecting if formulas based on column value

    If the 2 formulas are the same, why even do the test in the 1st place?

+ 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. Selecting cells in one column based on criteria in another
    By CDandVinyl in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-15-2017, 03:29 PM
  2. [SOLVED] Need formual help for selecting correct column based upon value in another column
    By rde55cae in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-01-2016, 03:17 PM
  3. [SOLVED] Vertically selecting column data and ignoring formulas in the selection
    By lsargent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2016, 03:55 PM
  4. Selecting a column based on a cells value
    By gjwood in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-16-2013, 03:08 AM
  5. Selecting a column range based on a value in header row
    By Ad83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2012, 05:29 PM
  6. Selecting a column range based
    By dems in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-09-2010, 11:47 AM
  7. Selecting range based on adjacent column
    By yaju1120 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2007, 10:41 AM

Tags for this Thread

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