Paste numbers as string in google docs - google-docs

I have one spreadsheet of google docs with data like :
0012
0234
0065
i wanna paste in another google doc spreadsheet but with ctrl+c ctrl+v format data like numbers :
12
234
65
And i want conserve the string format.
With rigth-click copy-paste i cant copy.
Tested in firefox and chromium.
Edit: i have hundreds of rows, edit mannually not is a solution

Place a single quote (') in front of the zeros before you copy the cells.
If you need to apply this to lots of cells, set the contents of one cell to ' and use CONCAT to populate a new column with the ' and the cell contents.
If A1 is ' and the values you want to copy start in B1:
Set C1 to =CONCAT($A$1, $B1) and fill the formula down.

Related

Excel counting cells pasted as values from cells that contain a formula wiht a "" as result

Since I think I'm not expressing myself clear, I added some images:
As title reads,
I have a formula in a range C2 in Sheet1 something like this =IF(a2=2,2,""), and this is a recurrent formula from C2 to C21.
Sometimes the result is 2, but sometimes the result is "" which leaves an empty cell.
The problem is when i copy that range of cells and paste it as values in E2, it counts the empty cells, (the ones which result was "" in previous column) as if they were filled with some characters or something.
As you see in image above it counts 20, instead of only 5.
I tried to copy the range of empty cells and paste it into different text editors to see if i can find an odd character or something but no, they look only like enters.
Is there a way I can copy cells that contains a formula with "empty/nothing" results, and paste them as values and as empty cells for excel not to take them into account to perform the counting, they are also being taken into account in pivot tables.
Is there a special character that I could replace, like for example when i want to remove all carriage returns in a range of cells, i use the replace function in Ctrl+H and then in find what: ctrl+j and in replace with: (i leave it empty), and this removes all carriage returns included in cells, leaving all comments in a single line.
I usually have to go thru all the columns with same situation of fake empty cells, and delete them manually after i filter them (they are even displayed as blanks when filtering them).
Even if I use the Find & Select - Special - Blanks, it wont select the fake empty cells.
I look all around the google globe and wasn't able to find an answer.
I hope you guys can understand what i explained above and can help me.
Thanks in advance for your appreciated support.
Regards
The pasted cells are not really blank - if you turn on "Transition Navigation Keys" in File > Options > Advanced under the subheading Lotus Compatibility and you'll see there is an apostrophe in each of the "empty" cells.
What you've done is inserting a zero-length string into each of the cells which doesn't fulfil your if-criteria. These strings are then copied to the range you are pasting to.
To remove them quickly, there are a couple of options.
Using find and replace:
Select all the cells Press Ctrl + H to open the Find and Replace
window
Leave the Find What box empty
In the Replace With box,type a string that is not in the data, such as "$$$$"
Click the Replace All button, to Replace all the blanks with $$$$
Next, put "$$$$" in the Find What box and leave the Replace With box empty
Click the Replace All button, to replace all the $$$$ entries with nothing
Using text to columns
Select all the cells
On the Excel Ribbon, click the Data tab and selcect Text to Columns
In the dialog which pops up, select Delimited, then click the Finish button
I found all this info on the Contextures blog, which goes into some more detail about the problem, as well as presenting a couple more ways to solve it.

How to insert values from different cells in to a huge html string in MS EXCEL?

Hi I am trying to add cell values from different fields into a cell containing a huge html string.I tried using concatenate,& methods but it says that the formula exceeds 8192 characters.I need a way to automate the html string by inserting values from other columns as I have more than 50,000 rows.I'm new to ms excel, so please be elaborate.
It is possible to insert material into REALLY big strings without using big formulas. For example say A1 contains:
abcd1111111111111111111111111111111111111111
and we want to insert the word gary after the third character. We start by putting gary in cell A2 and then in A3 put the formula:
=REPLACE(A1,3,0,A2)
Using 0 for the number of characters to replace makes the REPLACE() function behave like an INSERT() function:
Even though A1 and A2 can be REALLY big, the formula itself is quite small.

Concatenate repeats first row cell values even though formula selects different cells

I am trying to prep some zip codes to go into the WHERE clause of a SQL query:
WHERE [Zip_code] IN ()
To do this I put all the values into Excel and want to concatenate the zip codes with an apostrophe at the beginning and an apostrophe, a comma, and a space at the end so 99508 would become '99508', . So I wrote the equation
=Concatenate("'",D2,"', ") where D2 is the zipcode. It worked for the top row producing '99058', but when I filled down it still showed the value for D2
To make matters more confusing, when I click on the cells and see the formulas, they are tracking the proper cells but still show data for the top row
I have tried everything that I can think of to solve the problem: reformatting everything as text, formatting the zipcodes as Numbers rather than text, putting the text in the adjoining columns (C2 has an apostrophe, D2 has the Zip code, E2 has apostrophe, comma, and space) and concatenating, using & instead of concatenate ("'"&D2&"', " ), concatenating A on the front and B on the end to do a find and replace, but I still get the same result. If I select a concatenated cell, click on the formula bar, and press enter the cell shows the proper concatenation, but I would rather not do that for every single cell.
My co-worker suggests including that the zip codes were taken from pivot table outputs.
Any suggestions?
Turns out that calculations had somehow been set to manual instead of automatic.
Switching back to automatic solved the problem.
use this instead
=concatenate("'";D2;"',")
idk if gonna work on you sheet, bc i have in spanish my MS-office suite
but if doesn't work, replace the ; for ,
if you copy the formula to the other cells, this must change to the next row
First is clear the worksheet format
secondly, click on file on the excel, then to option, to formula after formula, check the position of the calculation. if its in automatic change it back to Manual and then change it back to automatic. That will solve it.

excel concatenate prefix in comma separated cell

I am horrible with excel. I rarely have to use it but today I do.
I have cells that have images that are comma separated. these cells are in the same column. i need to add a prefix lg_ to each comma separated image in the cell. I have done some reading on concatenate in excel and I am not sure if this is the right method to use. Does anyone have any good tricks/tips to accomplish this?
It currently looks like :
b3f9e6_1008a.jpg,4f57dc_1008d.jpg,9205eb_1008b.jpg,cb1c14_1008.JPG,ad8884_1008c.jpg
the result would look like this:
lg_75c552_599d.jpg,lg_a3a180_599a.jpg,lg_5c2ec4_599e.jpg,lg_dbb052_599b.jpg,lg_419420_599f.jpg,lg_8eb065_599c.jpg
note: images names are different because I just pasted what I already completed manually.
This should be on SuperUser.
What I would do is do Find..Replace on the comma and replace it with ",lg_" (without quotes). Then you need to prepend the strings with "lg_". You can do this by using another column and doing ="lg_"&A1 where you replace A1 with the proper cell reference. Drag this formula down and then copy and paste value that over the initial data.
Edit: Just because you seem new to Excel: To do Find..Replace hit Ctrl + H. The dialog box that will pop up is self explanatory.
This can also be done using the SUBSTITUTE command in a cell formula.
e.g.
Set C30 = "lg_"
Set D30 = "b3f9e6_1008a.jpg,4f57dc_1008d.jpg"
then in E30 type the following: =C30&SUBSTITUTE(D30,",",","&C30)
This does the same as ApplePie's answer, but with the added benefits that you do not need to do a manual replace, and "lg_" is not hard-coded so it can change depending upon the contents of a cell. Therefore you can copy the formula down a column and use different prefixes for each row. e.g.
IF C30="244" and D30="91,99" then E30 = "24491,24499"
IF C31="376" and D31="5,6,7" then E31 = "3765,3766,3767"

Increment all numbers

Suppose I have a list of numbers starting with 32,33,33.1,34 and so on. So what i am trying to achieve is , if I will replace the number 32 to 42 then all other numbers should also change like 42,43,43.1,44. Is there any way to achieve this using any editor or logic or may be in excel sheet.
In an excel sheet, you can use Paste Special to change all the values in one go:
Type 10 in a cell somewhere, and copy that cell.
Select the range containing the numbers and "Paste Special" > "Add".
In Excel. Put the number 32 in cell A1. Then in A2, put '=A1+1'. In A2 put '=A1+1.1' etc. Then when you change 32 to 42, all the other cells will be updated automatically.

Resources