I'm trying to find if cells have specific string or not. This is how I do it right now:
=IF(ISNUMBER(SEARCH("AAA";L2)); "yes"; "no")
If a cell has "AAA", I write to another cell yes, if not, I write no...
The problem is that it also gets true answer for AAA1 or AAA1234 for an example, how can I return true statement only for AAA?
If there are trailing numbers/charcters in my string, I want to reutrn no, but the cell itself might be longer... for and example "AAA BVC BFD2" etc. Then I want to return true. False if for an example: "AAA1 BVC BFD2"
As I mentioned in comments, you can use this one:
=IF(ISNUMBER(SEARCH(" AAA ";" " & L2 & " ")); "yes"; "no")
How it works:
suppose you have a string "AAA BVC BFD2" in cell L2.
" " & L2 & " " part modifies this string to " AAA BVC BFD2 " (note, there're additional spaces in the end and in the beggining)
now, we're able to search " AAA " (with spaces) in modified string " " & L2 & " ".
I'm clearly missing something as it seems to me that you could do this with something as simple as
=IF(LEFT(A1,4)="AAA ","yes","no")
I don't think the question is particularly clear, if I'm being honest...
Related
Column A - first name list
Column B - last name list
Column C - salutation list
I want in column D: HI "salutation" + first name + last name!
I try ="Hi &C1&" "&A1&" "&B1&"!" -> result Hi Mr. Brad Pitt!
But I want the result Hi "Mr." Brad Pitt!
You can use two double quotes where you want each double quote to be, in order to escape it.
="Hi """&C1&""" "&A1&" "&B1&"!"
you can use 2 double quotes to get a double quote in your text.
Try this instead: ="Hi """&C1&""" "&A1&" "&B1&"!"
Try below formula-
="Hi " & CHAR(34) & C1 & CHAR(34) & " " & A1 &" "&B1&"!"
I have a formula below:
=ISNUMBER(SEARCH("Perso",$A2))
I want to it return True for the field that exactly contains my key word "Perso"
However, from the image you can see that both rows return True, because the word "person" also contains "perso".
Can anyone provide some suggestions on how can I achieve my goal in Excel.
Include the deliminating space:
=ISNUMBER(SEARCH(" Perso "," " & $A2 & " "))
I can't tell why I'm getting an error with the below formula:
=IF(AND(AL=AM, AK=TRUE), "Unchanged, " ", IF(AND(AL>AM, AK=TRUE), "Downgrade", " ", IF(AND(AL<AM, AK=TRUE), "Upgrade, " ")))
Columns AL and AM contain values 0-4. Column AK contains True/false. If the conditions are met I want to insert the text string. If they are not met, I want to insert the single space to leave the cell blank.
Thank you!
You need to put the nested IFs in the False of the previous:
=IF(AND(AL1=AM1, AK1), "Unchanged", IF(AND(AL1>AM1, AK1), "Downgrade", IF(AND(AL1<AM1, AK), "Upgrade", " ")))
Another method with out the AND():
IF(AK1,IF(L1=AM1,"Unchanged",IF(L1>AM1,"Downgrade",IF(L1<AM1,"Upgrade",""))),"")
You don't need the " " after each of the text strings. The formula wasn't working because you were trying to define 4 parameters in each if statement. removing the ," " should fix this.
=IF(AND(AL=AM, AK=TRUE), "Unchanged, IF(AND(AL>AM, AK=TRUE), "Downgrade", IF(AND(AL<AM, AK=TRUE), "Upgrade, " ")))
Title pretty much says it all.
I have multiple dependent drop down lists (A2:H2)
Each time you select something, a corresponding number is entered into I2, with the numbers being separated by commas.
However, you MUST select a value from each drop down list or else you get #N/A error.
How can I make excel just "skip" or "ignore" missing values?
Thank you!
P.s.
I have already tried the IFERROR and IFNA commands but they do not work. I either get "TRUE" , with no numbers at all. And I also don't know how to make this work for about 6 different vlookups.
UPD:
=VLOOKUP(A8,'New Categories'!A$3:B19,2,FALSE) &", " &
VLOOKUP(B8,'New Categories'!A$3:B206,2,FALSE) &", "&
VLOOKUP(D8,'New Categories'!A$72:B$83,2,FALSE)&", "&
VLOOKUP(E8,'New Categories'!$A$72:B$83,2,FALSE)&", "&
VLOOKUP(F8,'New Categories'!$A$59:B$68,2,FALSE)&", "&
VLOOKUP(G8,'New Categories'!$A$59:B$68,2,FALSE)&", "&
VLOOKUP(H8,'New Categories'!$A$59:B$68,2,FALSE)
Use this one:
=IFERROR(VLOOKUP(A8,'New Categories'!A$3:B19,2,FALSE), "") &
IFERROR(", " & VLOOKUP(B8,'New Categories'!A$3:B206,2,FALSE), "") &
IFERROR(", " & VLOOKUP(D8,'New Categories'!A$72:B$83,2,FALSE), "") &
IFERROR(", " & VLOOKUP(E8,'New Categories'!$A$72:B$83,2,FALSE), "") &
IFERROR(", " & VLOOKUP(F8,'New Categories'!$A$59:B$68,2,FALSE), "") &
IFERROR(", " & VLOOKUP(G8,'New Categories'!$A$59:B$68,2,FALSE), "") &
IFERROR(", " & VLOOKUP(H8,'New Categories'!$A$59:B$68,2,FALSE),"")
I have an Excel 2010 document which has hundreds of rows each with a cell as below:
(without the quotes, of course)
"XX - A Name of Something Here"
Which I need to change to:
"A Name of Something Here (XX)"
I'm trying to figure out the best way to accomplish this and could really use some assistance.
Try this:
=RIGHT(A3, LEN(A3) - 5) & " (" & LEFT(A3, 2) & ")"
which means
all but the last 5 chars of the string, counting from right to left
5 because XX space dash space is 5 chars long
a space and an open parenthesis
the leftmost two chars ie XX
a close parenthesis.
This formula will work given your example
=MID(A1&" ("&A1,5,LEN(A1))&")"
How about:
=MID(A1,3,9999) & "(" & LEFT(A1,2) & ")"
but how about the dash??
=RIGHT(A1, LEN(A1) - 5) & " (" &LEFT(A1, 2) & ")"
This will work too - I like "concatenate" since I don't need to keep track of the &'s
=CONCATENATE(RIGHT(A3,LEN(A3)-5)," (", LEFT(A3,2),")")
So many fun ways to do the same thing...