Take single code out from excel cells - excel

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.

Related

Vlookup Not Working - Excel 2016 [duplicate]

I am working with an excel file and I am trying to "map" some values with the vLookUp function.
The first parameter of the vLookUp function is giving me headaches: The function works with certains values (typed by hand in a text format)...but doesnt work with pre-generated values (the sames ones...but generated from an ERP system..). I checked to make sure that I was looking for "same nature" values ( text vs text ) ...but I can't find out why the first 3 values (typed by hand) are fine... but the last 3 (pre generated) gives me a #N/A error: It has to be a difference of "format" ..but I can't find out where's the difference...
This is the formula used: =VLOOKUP(D1;$A$1:$B$219;2;FALSE)
The actual file
1008600 379.99 1008600 379.99
1008601 379.99 1008601 379.99
1010600 449.99 1010600 449.99
1010601 449.99 1010601 #N/A
1013600 489.99 1013600 #N/A
1014601 509.99 1014601 #N/A
1015600 569.99
1018603 679.99
1019600 809.99
Thank you !
Using this formula will address the issue highlighted by RocketDonkey
=VLOOKUP(TEXT(D1,"#"),$A$1:$B$219,2,FALSE)
The issue is that you haven't converted you values in column A to numbers. Since the first three values in your lookup range are themselves strings, they are matching the stringified numbers.
In order to fix, click on one of the numbers in column A, press Ctrl+Space to select the entire column, and then click on the exclamation mark and select Convert to number:
After that, you'll notice that your previous values now show errors, so follow the same process to conver them to numbers as well. #nutsch's solution is does not require you to modify your data, so if the type of your data is not crucial, that is a good fix as well :)
This has been a major pain for me as well(Excel is full of stupid assumptions). What I do is copy the entire column to a text editor, change the column to match the lookup column, and copy and paste the data back into the column. This has worked well for me.
May I highlight the little noticeable reply that Barry Houdini came with in 2012 above:
=VLOOKUP(D1&"",$A$1:$B$219,2,FALSE)
that really works (for me in Excel 2010), despite you are dealing with Numbers or a mix of Numbers or Text strings.
Cudos to Barry, you are a truely Houdini

Excel: If vlookup returns specific text, countifs number of instances (multiple)

First post, but I am stuck and was hoping for some help. What I am trying to do is use a nested IF formula to determine whether the value returned by a VLOOKUP matches specific text on another sheet in the same workbook. If it does, to then use the COUNTIFS function to determine the sum of instances that specific text contained in a specific cell appears on another sheet (also in the same workbook).
One part of these formulas seems to work, but when I combine it with others, it errors and I can't figure out why.
It's probably something simple, but I'd appreciate any help. Here's the part that seems to "work"
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))
If I put one more parenthesis, it works as is, but seems to omit some of the "All" Vlookup results... thus why I put works in quotations above. That might be an issue with my spreadsheet though, but felt I should include in case I'm just being idiotic. Regardless, when I input two additional IF statements, it errors.
The final formula I've crafted looks like this (double spaced for ease of reading only):
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="One",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Two",
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY"),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Three",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),"0"))
Any ideas?
Thanks!
Ryan Olson
Just cleaned up some bracketing. Let me know how it goes as I didn't alter the formula otherwise.
=IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="All",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")+(COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="One",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Two",
COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Three",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),"0"))))

VLOOKUP to only fetch the right X Characters

I am trying a VLOOKUP function in excel 2010. However, when it returns the results, I am trying to eliminate the first couple characters from the resulting column. When I use the RIGHT or LEFT functions within the VLOOKUP, it doenst work.
Anything I am doing wrong? Or any suggestions would help. Alternatively, I have copied the data as text into another column and removed the unwanted information.
=VLOOKUP(A27,Sheet2!$A:$L,RIGHT(5,2),FALSE)
Try this one:
=RIGHT(VLOOKUP(A27,Sheet2!$A:$L,5,FALSE),2)

Vlookup not working for specific text

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.

Excel Autocomplete/lookup that I can edit

I have a system where I enter a code in one cell and in the next cell the corresponding text appears, using a lookup table.
Cell 1: I put "W1"
Cell 2: "Make sure that both your opening and ending are interesting and engaging." appears automatically.
Of course, I can't then edit the text. If I try, I find I'm editing the lookup formula.
What I'm really trying to do:
I'm a teacher, the codes are target codes and the text is the actual advice to the pupil. We have a standard system of targets, but we tend to customise the text in different ways according to the pupil.
Am I doing this the most sensible way? Is there a workaround?
Many thanks.
Perhaps it's not you're looking for, but try the following:
Put all grades in the column 1 (corresponds to your cell 1).
Apply Lookup formula and get default answers - this for the column 2.
Now copy entire column 2 and paste special it as values to the same place.
After the above you'll get default grades as TEXT ready for your editing.
Please respond in comments in case you have some more not obvious (from the initial request) limitations.
This requires, as far as I understand it, VBA. Thanks to those below for helping me figure that out.
The answer is here:
VBA Lookup and insert on cell change

Resources