I have a list of SSN in my excel file (9 digits, some of which have leading zeros, no hyphen).
I keep them in the special format (numero da seguranca social in portugues) so I can keep leading zeros in the column.
I want to add ' ', to the column so that I can search them in SQL query in bulk.
When I use concatenating formula ( concatenating("'",B2,"'",",")), the leading zeros are gone.
How can I achieve the result of 00XXXXXX as '00XXXXXX', ?
Thank you!
I am not sure what your special format is, but I am guessing that if the value is xx the format makes it look like 00xx. Similar to a zip code.
So the value when you change it to text looks like xx.
I can think of 2 ways to fix it
Write a formulae which basically does what the special format does. For example it would make xx as 00xx. Then you can concatenate this new value like u mentioned earlier
Copy the values from excel to notepad and then paste it to excel again. When you copy from excel to notepad, the formatted value, i.e. 00xx will get copied to notepad which can then be pasted to excel in a separate unformatted cell.
One way of doing this is to copy your SSN column from your file and paste it into a new file all by itself. Then, while ensuring that the SSN numbers are formatted with any appropriate leading zeros, save the new file as a text/tab delimited file and close it. Now, using Excel's Open File command, select your text file and on Step 3 of 3, select Text for the Column data format. Now, you should be able to select that column of data and copy it back to your main file and perform your concatena
Did you try ''00XXXXXX' or "'00XXXXXX"? That is, add one single quote before the number and Excel interprets it as a string, not a number. If you will not do any numeric operations with it, then it should be a string.
Thank you all for your input.
I ended up using #tigeravatar 's method, which is
="'"&TEXT(B2,"000000000")&"'"&","
and it worked for me.
Thank you!
Related
we have sort of data in excel like this ---> 34:5:20
excel likes to consider it as time or date.
here is the problem because I know it's not a date and what ever action I want to do with it again
excel thinks it's a date/time value .
how can I stop this behavior ?
(each of the ':' delimited values has a special meaning to me but not date/time)
thanks a lot.
There is one option though, you can use the formula below, to convert the dates back to your format
=CONCAT(" ",TEXT(A2,"[h]:mm:ss"))
I am adding a space using concat function just so that if you ever decide to convert all to value, it will not return back to dates
I found the solution finally .
copy column to notepad.
select another column
change it's format cell to text.
now paste from notepad.
now my data is considered as text and I can separate the values using "column to text" from DATA tab.
thank you all for your valuable time.
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.
I am trying to prepare an excel file for import into another software program. The data was originally converted from a text file. The problem is that certain cells with dates or numeric values contain unwanted text, "DELIM". Since I have many rows of data that contains this text, I am trying to create an IF statement to remove the text from the cell. Below is a formula that I have tried, but it is not working:
IF(ISNUMBER)SEARCH("*DELIM*")), "TRUE(DELETE "DELIM")
Is there an IF statement that can be used to delete the unwanted text from the cell?
Thank you.
=SUBSTITUTE(A1,"DELIM","") will delete the exact text "DELIM" (case sensitive) from the text in A1.
If it's a one-time job, it might be easier to use search-and-replace (ctrl-h). If what you want to do is more complex, you may want to process the text file first in a another tool - probably one that offers regular expressions.
May be you can try this instead:
=IF(SEARCH("DELIM",A1)="VALUE!",A1,SUBSTITUTE(A1,"DELIM",""))
the above code searches for the string "DELIM" if it finds it replaces with ""
else it will replicate the same string.
Is it possible to let Excel 2010 not automatically convert a text or number cell into h.mm format?
In other words I've 10 thousand cells that contain numbers and parenthesis like these ones:
1.2 (905.A)
1.3 (905.A1B)
etc. etc.
If I do find (*) and replace to nothing, Excel automatically convert these cells to h.mm format, also if I set these cells as "Text", so it display:
1.02
1.03
etc. etc.
instead I want:
1.2
1.3
etc. etc.
is there a way to do it?
Have you tried changing the column formats to text before pasting the values in?
If you are entering the values manually rather than pasting then prefixing the entry with a single quote will make Excel treat the field as literal text:
'1.2 (905.A)
UPDATE
After discussion I now understand that the problem occurs after the data in imported when you try to do a find and replace to get rid of the brackets and anything within them. I cannot replicate this issue, Excel seems to format the remaining number appropriately for me, but as you are still having this issue I would suggest an alternative approach to the find and replace:
If the text you quoted was in cell A1 then in B1 you could use:
=LEFT(A1,FIND(" ",A1)-1)
This will return everything before the space. You can then either just hide the column you don't need or copy the new values, right click and do paste special then select values to replace the formulas with their values and therefore remove the need for the old column.
I have an excel spreadsheet that has two columns. When I choose to save it as a csv file, the comma after the second column is not in place. For example, i get this:
Invoice,SID No.
156106,ELC204R8
156106,WXC2048V
Instead of this:
Invoice,SID No.,
156106,ELC204R8,
156106,WXC2048V,
How to I get the comma in right before the line break?
This as I assume you are aware is not a usual requirement/format for saved CSV file.
To achieve what you are trying to do though, you need to trick Excel into thinking you are exporting a third blank/empty column.
One way to do this is to add the single-quote character ' into a third Excel column before exporting.
I just entered a space into the first 20 rows and that solved the issue.