+ Reply to Thread
Results 1 to 8 of 8

How can I use IF function for 2 formulas?

  1. #1
    Registered User
    Join Date
    12-14-2022
    Location
    Bucharest
    MS-Off Ver
    365
    Posts
    92

    Exclamation How can I use IF function for 2 formulas?

    Hello!

    I attached an Excel file and photos with the results that I want.

    Example:

    If match type is "PHRASE", then write "CHAR(34)&A2&CHAR(34)".

    If match type is "EXACT", then write ""["&A2&"]"".

    Would you like to help me?

    Thank you!
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Zero-Sama; 06-06-2023 at 04:57 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,888

    Re: How can I use IF function for 2 formulas?

    This?

    =IF([@[MATCH TYPE]]="PHRASE",CHAR(34)&A2&CHAR(34),"["&A2&"]")

    Would you like to help me?
    I'd like to know what you tried yourself before asking here. '

    It's nice if you are able to show evidence of your own efforts to solve an issue.

    EDIT: I think you have told us the wrong column. I think you mean this:

    =IF([@[MATCH TYPE]]="PHRASE",CHAR(34)&C2&CHAR(34),"["&C2&"]")
    Last edited by AliGW; 06-05-2023 at 06:15 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,888

    Re: How can I use IF function for 2 formulas?

    No reply ...

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  4. #4
    Registered User
    Join Date
    12-14-2022
    Location
    Bucharest
    MS-Off Ver
    365
    Posts
    92

    Re: How can I use IF function for 2 formulas?

    Hello,

    Thank you for your help.

    I attached 2 photos and an updated Excel file.

    Would you like to show me where is my mistake in the next situation?:

    If B2 contains "PHRASE", then return "cursuri engleza online".

    Else [cursuri engleza online].

    How I did:
    Please Login or Register  to view this content.
    Thank you!
    Attached Images Attached Images
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,888

    Re: How can I use IF function for 2 formulas?

    You have the values the wrong way round. You need this:

    =IF([@[AD GROUP]]="PHRASE", "["&[@KEYWORD]&"]",CHAR(34)&[@KEYWORD]&CHAR(34))

    IF(x=y, value_if_TRUE, value_if_FALSE)

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  6. #6
    Registered User
    Join Date
    12-14-2022
    Location
    Bucharest
    MS-Off Ver
    365
    Posts
    92

    Re: How can I use IF function for 2 formulas?

    Hello,

    I think I stated wrong the requirement.

    I attached the result.

    So, the statement is:

    If B2 contains "PHRASE", then return "cursuri engleza online".

    If B2 contains "EXACT", then return [cursuri engleza online].

    Thank you.
    Attached Images Attached Images

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,888

    Re: How can I use IF function for 2 formulas?

    This?

    =IF(RIGHT([@[AD GROUP]],6)="PHRASE",CHAR(34)&[@KEYWORD]&CHAR(34), "["&[@KEYWORD]&"]")

  8. #8
    Registered User
    Join Date
    12-14-2022
    Location
    Bucharest
    MS-Off Ver
    365
    Posts
    92

    Re: How can I use IF function for 2 formulas?

    Yes, thank you!

+ 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. Sum of formulas as a function of X
    By Chicago1 in forum Excel General
    Replies: 9
    Last Post: 08-16-2019, 04:24 PM
  2. Change formulas from function(a;b) to function(a,b) - ; ,
    By Operator in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-06-2016, 10:39 AM
  3. IF-function with formulas
    By Trilisser in forum Excel General
    Replies: 12
    Last Post: 02-04-2012, 10:11 PM
  4. VBA help with function formulas
    By Chris Hansen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2009, 11:41 AM
  5. formulas/function
    By craig@help in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-10-2006, 02:03 PM
  6. formulas/function
    By craig@help in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-10-2006, 11:34 AM
  7. [SOLVED] need help with function and formulas
    By fomula problems in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2005, 01:05 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