Vlookup not working for specific text - excel

I am working on two sheets of text, Lets say "apples" in sheet1 and i want to find the cells which contains "apples" in sheet2. Below function works for few columns and its not working for few columns even though the text is in both places..
=VLOOKUP("*"&apples&"*",Sheet2!H4:H499,1,FALSE)
I think, its because of the text format in sheet2. I removed unwanted chars using "clean" & "trim" function. but still having issue...
Have anyone faced this issue before...?
Update - This looks more of text format issue. I copied to notepad and found no unreadable chars or new lines...

Instead of
=VLOOKUP("*"&apples&"*",Sheet2!H4:H499,1,FALSE)
please consider using
=VLOOKUP("*apples*",Sheet2!H:H,1,FALSE)
Update - changed to deal with asterisk that I didn't see the first time I tried to answer this.

You need to fix your cells, i.e. change Sheet2!H4:H499 to Sheet2!$H$4:$H$499!
Without doing this, the range you're running the lookup in will move downwards when copying the formula - which is certainly not what you want! :-)

I had some issues with this recently.
I wanted to document that I tried:
look for trailing spaces
numbers formatted as text
ensured arrays were reference locked correctly (e.g. put a $ in front of the part of reference that shouldn't change)
When it still didn't work I copied both values into Notepad++ and changed encoding from UTF-8 to Ansi. What I found was there was a strange hidden character in one of the texts. It was like one of the values had been pasted from word and the space as a "special space" or something. You can get this when a dash is not really a dash but an endash etc.
To fix I pasted my range into Notepad++, changed encoding, search/replace all strange characters with nothing then pasted back into Excel. Then it worked just fine.

Related

How to remove hidden quotes on numbers in excel that prevent changing the format

I have copied several columns of data with ~85 rows from a webpage system that my company uses. One column of numbers copied over with no issues, but the other (and more important) column contains hidden quotes surrounding the numbers. I cannot change format, nor add the numbers, etc.
I have tried using =value(mid(cell,1,len(cell)-1)) to remove the quotes, and have also tried using substitute, with no success.
Does anyone know of another possible solution to try?
Thanks!
Saw the file as csv format. Close it and reopen in csv. It will show all the hidden quotations. Then use text to column and remove the special characters.

Conditional formatting no working with downloaded data

I downloaded data from our internal system and tried to apply conditional formatting, but it is not working. I cleared all the rules from the sheet and changed the format to Number, and everything is unsuccessful. However, if I replace the data manually it is working. I have huge numbers of rows and cannot change and edit them manually. Is there a workaround for this? I wanted to attach test data, but I don't find a way to attach to this post.
Thanks in advance!
The numbers are probably coming in as strings, which cannot be formatted. Try saving it as a CSV and then close it and open the CSV.
Characters taken from other sources may have spaces. The Code function results in the numeric code of the characters in the cells-Look for the cells in which the spaces are spaces with the code number 32. It is often the case that there is a space between the code number 160.
Use function =trim(Cell or Range) or check if You have this white marks" hard space" 160 or 32 in cells you downloaded data.
Check =Code(Cell) what nr code You have in cells if any or copy space and insert between quotation marks. =CODE(" ").Invisible space charts may not allow formatting cells with other sources.

Text to columns function not working properly?

I´ve this simple text inside a cell - this is an example of many with the same issue - and I need to put that into columns, delimited by spaces.
When I do that, the function just do the work with the first sentence, finishing in "deck", and stops there so I´m loosing half of my information or more If I´ve more lines.
I can´t understand why it´s happening, and I worked for hours on a macro that depends on this information as I wrongly assumed this would be plain easy.
($94.52) Hold revenue. Need to set up deck.
($10.89) Hold revenue. Need to contact purchaser.
Thanks for your help!
Ok I got the answer so I´ll post it myself.
I need to separate based on spaces and carriage returns, but I was just trying with spaces thinking there was no way to add carriage returns as a separator. I was wrong.
When you select the function, you´ve a field called "other". There you need to add "Control + J", which is the shortcut for carriage returns.
With that fix, the result is as expected.
Assuming your column is A and starts in row 1, create a second column with the following formula in B1:
=SUBSTITUTE(A1,CHAR(10)," ")
Copy down the entire B column. Copy and paste this column as values.
Now use the Text to Columns functionality, but use space as the delimiter.

Take single code out from excel cells

I have many cells on this format: JAN 2012 on excel (as shown on the on the image below), and I need to take it out from many cells (so I can´t do it manually. Does anyone knows how to make it? I´ve already tried using the functions "Right" and "LEFT" with the "concatenate one... but it didn´t work...
I used "=datevalue" to convert text to date
Either do a "find and replace" (Ctrl-H), on your whole column, and find the incorrect character (') and replace it with nothing.
If that does not work, for some reason, then VBA would work if you have already tried LEFT and RIGHT worksheet functions, etc.

Excel Space cannot be seen

I copied some names from translate.google.com. Then I pasted it on excel (each name in a column).
Now when I want to split it to keep the first name only, it does not work. It seems like excel can't see the space anymore.
I used this code:
=LEFT(R2;SEARCH(" ";R2;1))
You need to use commas (,) to separate your variables in the formula, so like this:
=LEFT(R2,SEARCH(" ",R2,1))
Does that help?
If not, please also post the contents of cell R2.

Resources