The tutorial provides a number of "Excel if contains" formula examples that show how to return something in another column if a target cell contains a required value, how to search with partial match and test multiple criteria with OR as well as AND logic.
One of the most common tasks in Excel is checking whether a cell contains a value of interest. What kind of value can that be? Just any text or number, specific text, or any value at all (not empty cell).
There exist several variations of "If cell contains" formula in Excel, depending on exactly what values you want to find. Generally, you will use the IF function to do a logical test, and return one value when the condition is met (cell contains) and/or another value when the condition is not met (cell does not contain). The below examples cover the most frequent scenarios.
If cell contains any value, then
For starters, let's see how to find cells that contain anything at all: any text, number, or date. For this, we are going to use a simple IF formula that checks for non-blank cells.
For example, to return "Not blank" in column B if column A's cell in the same row contains any value, you enter the following formula in B2, and then double click the small green square in the lower-right corner to copy the formula down the column:
=IF(A2<>"", "Not blank", "")
The result will look similar to this:
If cell contains text, then
If you want to find only cells with text values ignoring numbers and dates, then use IF in combination with the ISTEXT function. Here's the generic formula to return some value in another cell if a target cell contains any text:
Supposing, you want to insert the word "yes" in column B if a cell in column A contains text. To have it done, put the following formula in B2:
=IF(ISTEXT(A2), "Yes", "")
If cell contains number, then
In a similar fashion, you can identify cells with numeric values (numbers and dates). For this, use the IF function together with ISNUMBER:
The following formula returns "yes" in column B if a corresponding cell in column A contains any number:
=IF(ISNUMBER(A2), "Yes", "")
If cell contains specific text
Finding cells containing certain text (or numbers or dates) is easy. You write a regular IF formula that checks whether a target cell contains the desired text, and type the text to return in the value_if_true argument.
For example, to find out if cell A2 contains "apples", use this formula:
=IF(A2="apples", "Yes", "")
If cell does not contain specific text
If you are looking for the opposite result, i.e. return some value to another column if a target cell does not contain the specified text ("apples"), then do one of the following.
Supply an empty string ("") in the value_if_true argument, and text to return in the value_if_false argument:
=IF(A2="apples", "", "Not apples")
Or, put the "not equal to" operator in logical_test and text to return in value_if_true:
=IF(A2<>"apples", "Not apples", "")
Either way, the formula will produce this result:
If cell contains text: case-sensitive formula
To force your formula to distinguish between uppercase and lowercase characters, use the EXACT function that checks whether two text strings are exactly equal, including the letter case:
=IF(EXACT(A2,"APPLES"), "Yes", "")
You can also input the model text string in some cell (say in C1), fix the cell reference with the $ sign ($C$1), and compare the target cell with that cell:
=IF(EXACT(A2,$C$1), "Yes", "")
If cell contains specific text string (partial match)
We have finished with trivial tasks and move on to more challenging and interesting ones :) To check if a cell contains specific a given character or substring as part of the cell content, you can use one of these formulas:
Formula 1
Working from the inside out, here is what the formula does:
- The SEARCH function searches for a text string, and if the string is found, returns the position of the first character, the #VALUE! error otherwise.
- The ISNUMBER function checks whether SEARCH succeeded or failed. If SEARCH has returned any number, ISNUMBER returns TRUE. If SEARCH results in an error, ISNUMBER returns FALSE.
- Finally, the IF function returns the specified value for cells that have TRUE in the logical test, an empty string ("") otherwise.
Formula 2
Here, the COUNTIF function finds out how many times a certain text appears in a cell. To count partial matches, you place the wildcard character (*) on both sides of the text. If the count is greater than zero, then IF returns the specified value, otherwise - a blank cell.
And now, let's see how this generic formula works in real-life worksheets.
If cell contains certain text, put a value in another cell
Supposing you have a list of orders in column A and you want to find orders with a specific identifier, say "A-". The task can be accomplished with this formula:
=IF(ISNUMBER(SEARCH("A-", A2)), "Valid", "")
or
=IF(COUNTIF(A2, "*"&"A-"&"*"), "Valid", "")
Instead of hardcoding the string in the formula, you can input it in a separate cell (E1), the reference that cell in your formula:
=IF(ISNUMBER(SEARCH($E$1,A2)), "Valid", "")
or
=IF(COUNTIF(A2, "*"&$E$1&"*"), "Valid", "")
For the formula to work correctly, be sure to lock the address of the cell containing the string with the $ sign (absolute cell reference).
If cell contains specific text, copy it to another column
If you wish to copy the contents of the valid cells somewhere else, simply supply the address of the evaluated cell (A2) in the value_if_true argument:
=IF(ISNUMBER(SEARCH($E$1,A2)),A2,"")
The screenshot below shows the results:
If cell contains specific text: case-sensitive formula
In both of the above examples, the formulas are case-insensitive. In situations when you work with case-sensitive data, use the FIND function instead of SEARCH to distinguish the character case.
For example, the following formula will identify only orders with the uppercase "A-" ignoring lowercase "a-".
=IF(ISNUMBER(FIND("A-",A2)),"Valid","")
If cell contains, then return value – multiple conditions
A single ‘if cell contains’ statement is easy, right? But what if you need to check multiple conditions in the same formula and return different results? That is, if a cell contains some text, then return something, if it contains another text, then return something else, and so on.
To evaluate multiple conditions in a cell, you can use nested "if cell contains" statements. This allows you to create a chain of checks, with each condition leading to a specific result. Here are two generic formulas to achieve this:
Formula 1
Use the COUNTIF function to count how many times a certain text appears in a cell. If the count is greater than zero, then return the corresponding value. Otherwise, check the next condition.
Formula 2
Use the SEARCH function to find the position of a certain text in a cell. If the position is a number, then return the corresponding value. Otherwise, check the next condition.
For example, to checks if cell A2 contains "apple", "banana" or "lemon" and return the corresponding name of the fruit in cell B3, you can use one of these formulas:
=IF(COUNTIF(A2, "*apple*"), "Apple", IF(COUNTIF(A2, "*Banana*"), "Banana", IF(COUNTIF(A2, "*lemon*"), "Lemon", "")))
=IF(ISNUMBER(SEARCH("apple", A2)), "Apple", IF(ISNUMBER(SEARCH("banana", A2)), "Banana", IF(ISNUMBER(SEARCH("lemon", A2)), "Lemon", "")))
To fit your specific needs, you can extend the chain of conditions as necessary to handle more cases.
If cell contains one of many text strings (OR logic)
To identify cells containing at least one of many things you are searching for, use one of the following formulas.
IF OR ISNUMBER SEARCH formula
The most obvious approach would be to check for each substring individually and have the OR function return TRUE in the logical test of the IF formula if at least one substring is found:
Supposing you have a list of SKUs in column A and you want to find those that include either "dress" or "skirt". You can have it done by using this formula:
=IF(OR(ISNUMBER(SEARCH("dress",A2)),ISNUMBER(SEARCH("skirt",A2))),"Valid ","")
The formula works pretty well for a couple of items, but it's certainly not the way to go if you want to check for many things. In this case, a better approach would be using the SUMPRODUCT function as shown in the next example.
SUMPRODUCT ISNUMBER SEARCH formula
If you are dealing with multiple text strings, searching for each string individually would make your formula too long and difficult to read. A more elegant solution would be embedding the ISNUMBER SEARCH combination into the SUMPRODUCT function, and see if the result is greater than zero:
For example, to find out if A2 contains any of the words input in cells D2:D4, use this formula:
=SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$4,A2)))>0
Alternatively, you can create a named range containing the strings to search for, or supply the words directly in the formula:
=SUMPRODUCT(--ISNUMBER(SEARCH({"dress","skirt","jeans"},A2)))>0
Either way, the result will be similar to this:
To make the output more user-friendly, you can nest the above formula into the IF function and return your own text instead of the TRUE/FALSE values:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$4,A2)))>0, "Valid", "")
How this formula works
At the core, you use ISNUMBER together with SEARCH as explained in the previous example. In this case, the search results are represented in the form of an array like {TRUE;FALSE;FALSE}. If a cell contains at least one of the specified substrings, there will be TRUE in the array. The double unary operator (--) coerces the TRUE / FALSE values to 1 and 0, respectively, and delivers an array like {1;0;0}. Finally, the SUMPRODUCT function adds up the numbers, and we pick out cells where the result is greater than zero.
If cell contains several strings (AND logic)
In situations when you want to find cells containing all of the specified text strings, use the already familiar ISNUMBER SEARCH combination together with IF AND:
For example, you can find SKUs containing both "dress" and "blue" with this formula:
=IF(AND(ISNUMBER(SEARCH("dress",A2)),ISNUMBER(SEARCH("blue",A2))),"Valid ","")
Or, you can type the strings in separate cells and reference those cells in your formula:
=IF(AND(ISNUMBER(SEARCH($D$2,A2)),ISNUMBER(SEARCH($E$2,A2))),"Valid ","")
As an alternative solution, you can count the occurrences of each string and check if each count is greater than zero:
=IF(AND(COUNTIF(A2,"*dress*")>0,COUNTIF(A2,"*blue*")>0),"Valid","")
The result will be exactly like shown in the screenshot above.
How to return different results based on cell value
In case you want to compare each cell in the target column against another list of items and return a different value for each match, use one of the following approaches.
Nested IFs
The logic of the nested IF formula is as simple as this: you use a separate IF function to test each condition, and return different values depending on the results of those tests.
Supposing you have a list of items in column A and you want to have their abbreviations in column B. To have it done, use the following formula:
=IF(A2="apple", "Ap", IF(A2="avocado", "Av", IF(A2="banana", "B", IF(A2="lemon", "L", ""))))
For full details about nested IF's syntax and logic, please see Excel nested IF - multiple conditions in a single formula.
Lookup formula
If you are looking for a more compact and better understandable formula, use the LOOKUP function with lookup and return values supplied as vertical array constants:
For accurate results, be sure to list the lookup values in alphabetical order, from A to Z.
=LOOKUP(A2,{"apple";"avocado";"banana";"lemon"},{"Ap";"Av";"B";"L"})
For more information, please see Lookup formula as an alternative to nested IFs.
Vlookup formula
When working with a variable data set, it may be more convenient to input a list of matches in separate cells and retrieve them by using a Vlookup formula, e.g.:
=VLOOKUP(A2, $D$2:$E$5, 2,FALSE )
For more information, please see Excel VLOOKUP tutorial for beginners.
This is how you check if a cell contains any value or specific text in Excel. Next week, we are going to continue looking at Excel's If cell contains formulas and learn how to count or sum relevant cells, copy or remove entire rows containing those cells, and more. Please stay tuned!
Practice workbook
Excel If Cell Contains - formula examples (.xlsx file)
240 comments
Your wild card example says it will return "B" for anything with "banana" in it, but it returns "L" when it says "yellow banana"
Hi Zac,
You are right - the LOOKUP function does not work correctly with the wildcard character, so I removed that example. Sorry for the confusion.
I have a column with bank statement description in which reference number written at the end of each line and starts with LFT. Is there any why through which i can separate all LFT Number written at the end of each line. Each Line contains different set of long and short description that why i can't use text to column. Let me share two examples of each call .
Example 1: "Transfer Username AHM CABDUL HADI MOHAMMED HAYTHAM AL-TABB LFT23163L52RF "
Example 2: "Transfer ABC travel NAEEM HUSSAIN LFT23163VJTC8G47 "
How can i separate the alphanumeric written at the end and starts with LFT using a formula.
Hi! Find the desired position in the text with the SEARCH function and extract the text string with the MID function.
=MID(A2,SEARCH("lft",A2),20)
Hi all! Incredible post!
I have only 1 question, because I've been trying to solve this issue for hours and I cannot get around it...
I want to be able to do the following:
If cell A1 contains text "ABC" and cell B1 contains text "DEF", result = "100", but if cell A1 contains text "ABC" and cell B1 contains text "GHI", result = "87"; and also, if cell A1 contains text "ABC" and cell B1 doesn't contain "DEF" nor "GHI", result = ""
In "words", this means that I want a cell to reflect a certain result depending on the text content of 2 different cells.
Does anyone have any idea how to do this?
Thanks a bunch.
Best regards,
Charles
Hi! You can find the examples and detailed instructions here: Excel IF statement with multiple conditions. This should solve your task.
If cell contains formula and i want that cell value.
Ex: C2=G2, i want C2 value.
Hi! To check if a cell has the right match use below formula, if it match's it will give "C2" value else return "No Match" where values not match.
=IF(C2=G2,C2,"No Match")
if the value in status column in Dev testing, Sprint planning then i should return a text Development . What formula to use
Can you post your attempts at doing this? What have you done so far to achieve this goal? Please re-check the article above since it covers your case.
Hi,
I would like to use formula =LOOKUP(A2;{"forecast";"sales"};{"F";"S"}) but unfortunately this formula is not working correctly.
My data looks like this (cells contains this kind of information):
JLP ASAF hide sales
forecast
new fabric Forecast
new fabric sales
new fabric still under Development
sales
sales New Fabric
one time only to then be disc
only 126m sold in 2022 avg 2m per week
only 15m sold in 2022 purchased from sales
only 77m sold in 2022
Therefore, if cell contains a word „forecast“, when abbreviation should be „F“. And if cell contains a word „sales“, when abbreviation should be „S“. Unfortunately LOOKUP function is not working. Could you please help me solve this issue. Thanks in advance.
Hi! To determine if a cell has the right word, please read: How to find substring in Excel. You can combine several conditions in a formula using the IFS function.
=IFS(ISNUMBER(SEARCH("sales",A1)),"S", ISNUMBER(SEARCH("forecast",A1)),"F")
Yahooo! Now it's working! Thank you so much!
I want ISBLANK formula before above formula, like=IF(ISBLANK(D2),"Blank",IFS(ISNUMBER(SEARCH("sales",A1)),"S", ISNUMBER(SEARCH("forecast",A1)),"F")....but its not working.
First to find A1 is blank or not, if it is not blank then A3 will be the value of above formula, I mean this formula =IFS(ISNUMBER(SEARCH("sales",A1)),"S", ISNUMBER(SEARCH("forecast",A1)),"F")
can you please help me out
Hi! If you want to check if cell A1 is empty, use ISBLANK(A1) instead of ISBLANK(D2)
I guess, I couldn't explain correctly.
Actually I want 2 formula in a cell. 1st =ISBLANK along with =IFS(ISNUMBER(SEARCH(
First to find A1 is blank or not, if it is not blank then A3 will be the value of | =IFS(ISNUMBER(SEARCH( | formula,
I mean =IF(ISBLANK(A1),"Blank",IFS(ISNUMBER(SEARCH("sales",A1)),"S", ISNUMBER(SEARCH("forecast",A1)),"F")
I’m not sure I got you right since the description you provided is not entirely clear. However, it seems to me that the formula below will work for you:
=IF(ISBLANK(A1),"Blank",IFS(ISNUMBER(SEARCH("sales",A1)),"S", ISNUMBER(SEARCH("forecast",A1)),"F")
This is what I recommended doing in a previous comment.
Hello, I am running Office 365 Excel and in column k I am scanning barcodes (qty up to 1,200), when that number is scanned into a cell in column n what formula can I write to have excel search cells in column b for that same number and then enter a date in the and time in a cell in column k of the same row? I have a code written, when the number is scanned into a cell into column n it finds it and column b and highlights that complete row. Thank you for the help.
Hi! I’m not sure that I got you right, since the description you provided is not entirely clear. Maybe this guide will be helpful: How to insert today date & current time as unchangeable time stamp.
I have a dataset full of dozens of models. The variables used in each model need to be added to one cell with a (+) added between each variable. Not all variables were used in every model, so I need a way to include only the variables and plus sign IF the cell has text (which denotes the variable was used in that particular model). Example of what I mean is below if it shows up properly on the comment page.
A B C D E (output)
Toucan Robin Macaw Toucan + Robin + Macaw
Ostrich Robin Ostrich + Robin
Toucan Ostrich Robin Toucan + Ostrich + Robin
Robin Macaw Robin + Macaw
Thank you for the help!!!
Hi!
If I understand correctly, you want to merge cells with a separator. Use the TEXTJOIN function and this guide: TEXTJOIN function in Excel to merge text from multiple cells.
=TEXTJOIN("+",TRUE,A1:D1)
I have data in "column C" This data contain functions and text as well , Example C1=A1*B1, C2=123, C3=Robert
I need to set the condition in D column as to get only having function in C column, Similarly(Answer result of C1)
I need to set the condition in E column as to get only having number or text in C column(Answer result of C2 and C3
Hope you are clear about the illusturtion and seeking your kind help.
Sunil Pinto.
Hi!
Have you tried the ways described in this blog post? If they don’t work for you, then please describe your task in detail, I’ll try to suggest a solution.
Sir,
Thank you for your prompt response,
I have been gone through your blog
I feel the my requirement is not covered in it.
Actaully I wanted to seggreate the cells with two types
1. Cells Containing:Number and Text or its combination (Example: 123, Sunil, Sunil-123)
2. Cells Containing:Formula or functional result.
Hope you will help me to get resul.
Thank in advance
Regards,
Sunil Pinto.
You can use the ISFORMULA function to identify the cells in which the formula is written.
Hi,
I need to find the text in list of data which contain specific text to return a specific value and am trying to use IF function with combinations of AND and ISNUMBER, SEARCH but it does not return expected result. can you teach me how can I solve this pls?
=IF(AND(ISNUMBER(SEARCH("NC",L4)),AK4="C",H4="WW"),"C-NC",IF(AND(ISNUMBER(SEARCH("SC",L4)),AK4="C",H4="WW"),"C-SC",AK4))
Thank you.
Hi!
Your information is not enough to help. I don't have your data and I don't know what kind of result you want to have.
Hello.
What to do if the "IF" command overwrites cells?
For example, for participant ID N840, age 24 is needed. I am using =IF(A2="N840", "24", ""), and it works well.
However, for a different participant, ID N860, the age needs to be 26. When writing the command, it overwrites the previous one, leaving it blank.
Important to mention that I have multiple data from each participant (longitudinal data).
Thank you very much.
Hi!
I don't really understand what your problem is. Perhaps this article will be helpful to you: How to copy formula in Excel with or without changing references. If this does not help, explain the problem in detail.
Dear alexander,
Thank you for your prompt response. I will try and explain it thoroughly:
I have 20 participants (each has an ID code, e,g., N840), that filled out the same questionnaire over time (meaning, for each participant, I have roughly 16 responses, that is 16 excel rows). The particiapnts filled in their demographic data in a different questionnaire.
I want to assign each participant his age across all of his responses. I am doing the following:
For example, the data for participant N840 is located in excel rows 2, 4, 9, and so on. I am using the following command to enter his age across all rows: IF(B2="N840", "24", ""). It works and fills the column where needed (e.g., rows 2, 9) at the age of 24.
However, when I create a formula for the next participant (A840) in the adjacent row, i.e., IF(B3="A840", "25", ""), it deletes the age data for the previous participants.
I hope it is more clear now.
What can/should I do differently?
Thank you,
Dana
Create a table with 2 columns: ID code and age. You can get the age of each participant from this table using the VLOOKUP function. For example,
=VLOOKUP(A1,Sheet2!A1:B20,2,FALSE)
A1 - participant ID code
For more instructions and examples, see this article: Excel VLOOKUP function tutorial with formula examples.
I hope it’ll be helpful. If something is still unclear, please feel free to ask.
Hi,
I'm trying to find the best formula for my scenario,
I need to search cell B2 - if it contains one word and contains one cell, then result another cell.
Currently, the below formula works
=IF(AND(ISNUMBER(SEARCH("H-Type",B2)),ISNUMBER(SEARCH($AW$2,B2))),$AZ$2,"")
I need to add, if this is false, then continue searching for results with alternative options
Like (SEARCH("P Type",B2)),ISNUMBER(SEARCH($AW$3,B80))),$AZ$3,"") and continue until result is found
Sample/search options for B2:B1840 fields - maybe 30 different text options like "H-Type" or "P-Type"
H-Type® (18"/450mm) X with X and X
P-Type (90"/2200mm) X with X and X
Sample options for AW2:AW24 cells
12"
18"
90" etc
Results - Table(called Sizes) between AZ2:BD24 depending on result of text option
Example. If "H-Type" then result within AZ:2AZ24, if "P-Type" then result within BB2:BB24 etc
Actual value of result will be single numbers between 2 - 20
So, I need to check cell B2 contains "H-Type" and AW2, if yes show value in AZ2, if no check if B2 contains "H-Type" and AW3, if yes show value AZ3, if no continue until a match is found. There should always be a match to one of the combinations between each text and cell option.
or
If B2 contains "H-Type" and AW2 then VLOOKUP(B2,Sizes,4,FALSE))
If B2 contains "P-Type" and AW2 then VLOOKUP(B2,Sizes,6,FALSE))
I hope that all makes sense,
I think this will be way to many conditions for one formula, is this formula even possible?
Thanks,
Hello!
I recommend using the IFS function instead of the IF function for many alternative searches. For more information, read this article: The new Excel IFS function instead of multiple IF.
For example, try this formula:
=IFS(AND(ISNUMBER(SEARCH("H-Type",B2)),ISNUMBER(SEARCH($AW$2,B2))),$AZ$2, AND(ISNUMBER(SEARCH("P Type",B2)),ISNUMBER(SEARCH($AW$3,B80))),$AZ$3)
I hope my advice will help you solve your task.
I am working on a running document. I am attempting to create a formula that will subtract from two cells IF text or a number is present in a different cell. For example if text or a number is present in V3 or U3, then perform E3-D3. My formula looks like:
=if(istext(V3,U3),E3-D3)
But it does not work.
Any ideas?
Hello!
The ISTEXT function only checks the text in the cell, not the number. Try ISBLANK function.
=IF(AND(ISBLANK(U3),ISBLANK(V3)),"",E3-D3)
Hello, I need a help in "improv"ing a formula.
I have something like this in an if: IF(OR(C13="Closed",C13="Dropped",C13="Suspended"), ##DoThis##, ##DoThat## )
Can I rewrite it in a manner where I need to type C13 only once? like..
IF(SOMEFUNCTION(C13,"Closed","Dropped","Suspended"), ##DoThis##, ##DoThat## )
Reason being, there may be another string that might have to be checked for C13, and I am too lazy to type in C13 again ! :)
I am aware that I can probably write it like:
IF(ISNUMBER(FIND(C13,"Closed"&Dropped"&"Suspended")), ##DoThis##, ##DoThat## )
But, is this the only option?
Thank you very much.
Hello!
Instead of a formula
OR(C13="Closed",C13="Dropped",C13="Suspended")
use
OR(C13={"Closed","Dropped","Suspended"})
Hello,
I am trying to add this function; where a particular range of numbers results in a specific text response
for example:
scores in one column within the following ranges (98) will result the following descriptors in the adjacent column (exceptionally low, below average, low average, average, high average, above average, exceptionally high).
how do i write out a command?
Hi!
You can learn more about multiple IF conditions in Excel in this article on our blog: Nested IF in Excel – formula with multiple conditions.
Excellent!
Thank you!!
Hi,
Please help provide the formula if a range of cells contain the letters BR, then I would like the sum of another range of cells of just containing BR to return the value, thank you.
Hello!
To find the sum of the cells by condition, try using the SUMIF function. I hope it’ll be helpful. If this is not what you wanted, please describe the problem in more detail.
Exactly what I needed thank you!
Hi Alexander,
I'm currently using the below formula to extract/filter out data from a master sheet to another sheet, however this gives blank cells/rows in between which I don't want. I tried adding VLOOKUP to the formula but unsuccessful (still noob at using LOOKUP).
=IF(ISNUMBER(SEARCH($I$8,Master!H10)),Master!H10,"")
May I seek your help on how to edit the formula, so that I can have a list of results without blank cells/rows in between please?
Thanks in advance!
Hello!
To get a list of values by condition, I recommend using the FILTER function
For example,
=FILTER(Master!H1:H10,ISNUMBER(SEARCH($I$8,Master!H1:H10)),"")
You can find the examples and detailed instructions here: Excel FILTER function - dynamic filtering with formulas
I have a text string including multiple words and I would like the return value to be different for each IF. For example Statement=send letter with word USD and CAD.If the string includes USD then abbreviate US and if CAD is found then abbreviate CA.
Hi!
To understand what you want to do, give an example of the source data and the desired result.
=IF(ISLBANK(P5),(ISNUMBER(P5), "Done", "Pending"))
I have alredy applied this formula in A5 Cell. So my A5 row is now fill with this formula value. But when my B5 cell value is blank, Then I need to blank also my A5 Cell. How can I applied that with this formula?
HI! I am wondering if you guys can help.. Doing some report for my team
Conditions if scores are from 6.42-7.41 = 5 Coins... if 7.42 - 8;49, 10 coins and if 8.50 - 300, 15 coins.. I used
B22 = 5
B23 = 10
B24 = 15
=IF(C3>=6.42,$B$22,IF(C3>=7.42,$B$23,IF(C3>=8.5,$B$24,)))
C3 is 25.53 but result still is 5. Should be 15. Not sure if there's a mistake with my formula. Thank you.
Hi!
You can find the examples and detailed instructions here: Nested IF in Excel – formula with multiple conditions. Try this formula:
=IF(C3>=8.5,$B$24, IF(C3>=7.42,$B$23, IF(C3>=6.42,$B$22,"")))