+ Reply to Thread
Results 1 to 6 of 6

Help with IF THEN FUNCTION

  1. #1
    Registered User
    Join Date
    07-09-2013
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    26

    Help with IF THEN FUNCTION

    example.xlsxHey, guys. I am trying to do some formatting for a template and I need a piece of the message I generate with the formula to be conditional on another cell.

    I am just guessing what I need, but haven't had so much luck yet.
    Here is what I have placed in excel, but it doesn't work.

    =IF(D17=Target Change - Report,[Target Change: ],[Current Target:]

    What I want to do. I have a dropdown menu (cell D17) that you can choose the subject line for the email & I want this formula to be conditional based on the subject line to change either to Target Change or Current Target if the subject line doesn't have target change - report/update selected. If it is a target change I want the cell to say target change, but if not I want it to say Current Target.

    =IF D17=Target Change - Report OR Target Change - Update, Target Change:, Current Target:

    Let me know what you think & I greatly appreciate it!
    Last edited by Tyriel; 07-15-2013 at 05:13 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Help with IF THEN FUNCTION

    Tyriel, welcome to the forum.

    Perhaps you could upload a small sample workbook, showing your expected outcome, as it isn't clear, at least to me, if you mean IF D17 = (a value assigned to "target change") MINUS (a value assigned to ""report"), or if you mean IF D17 contains the text "Target Change - Report",... which seems unlikely, but the less guessing we have to do, the quicker you'll be helped
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Help with IF THEN FUNCTION

    I'm a bit unsure too as to what you require exactly but it looks like you have a drop down (D17) with several subject lines. Then depending on the subject you want cell X to display something (you refer to as Target Change OR Current Target.

    If the drop down list is written on the sheet (or another sheet) you may want to put in the next column next to each option the value you want to show and perform a lookup so you correctly display the required output.


    As BB1972 as mentioned a sample file will further help explain what you require, to upload a file click Go Advanced under the bit where you write a new post. Then click Manage Attachments and you can add a file from there.
    Say thanks, click *

  4. #4
    Registered User
    Join Date
    07-09-2013
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Help with IF THEN FUNCTION

    Harribone,

    I attached an example to the original post. Basically I want this line's content to be directly correlated with the subject line.
    it looks like you have a drop down (D17) with several subject lines. ( You are correct )

    Thanks for your help!

  5. #5
    Registered User
    Join Date
    07-09-2013
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Help with IF THEN FUNCTION

    I attached an example to the original post. Basically I want this line's content to be directly correlated with the subject line.

    I have been picking at it, but I am not sure if my brain is getting fried or not.

    Thanks for your help!

  6. #6
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Help with IF THEN FUNCTION

    Firstly apologies for overlooking the attached file, didn't see it hiding there.

    I have attached an amended copy of this for you which uses the vlookup method to show the reult you want for each Subject Line.
    If you want to use the IF method to show the correct result then try:

    =IF(OR(G4=A,G4=B),"SHOW THIS",IF(OR(G4=C,G4=D),"SHOW THIS","ELSE SHOW THIS"))
    where G4 is the drop down cell and A B C and D are the cells in Col D. Its along the same route you had originally but with a second IF function nested inside the first to test for the next bit. Hope that made sense anyway.

    I've put forward the vlookup solution instead as the best way to do this, should you want to change what is displayed for a certain subject line you simply change the corresponding value in column E which saves you picking through your formulas again.
    Attached Files Attached Files
    Last edited by Harribone; 07-16-2013 at 01:49 PM.

+ 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. Replies: 0
    Last Post: 01-19-2013, 01:35 PM
  3. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  4. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  5. [SOLVED] Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 PM

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