I have a libreoffice sheet that I would like to have the rows increase by 1
example:
1
2
3
4
The problem is I know I can do this with autofill but I have 50000 rows and dragging down takes awhile.
Thanks
Assuming that you already have data up to row 50'000, and you have an empty column (I'll use Col. A) for the series.
Jump to the last cell in one of the "used" columns Ctrl + Arrow down (or scroll all the way down to Cell A50000) then move sideways to Col. A and place an "X" in cell A50000. You now have an empty column A, with an "X" in cell A50000.
Go to cell A1 ( Ctrl + Home ). Put the number "1" in cell A1. Put the following (secret!) formula in cell A2:
=A1+1
Copy cell A2 with Ctrl+c
Stay in Cell A2...
Press Ctrl+Shift+Arrow down, The area from A2 to A50000 should now be highlighted.
Press Ctrl+v to paste the formula all the way down...
IMPORTANT!
Press Ctrl+c to copy the just pasted data (A2..A50000).
Press Ctrl+Shift+v to paste the just copied data "over" the original data with "paste special".
In "Paste Special" make sure that you have NOT selected the option: Formulas.
This will now paste all the results of the formulas back as fixed numbers.
This should take less than a minute, of which most of it is waiting for the system to calculate and to paste (I tried it for 1 mio lines..)
By just changing the formula from =A1+1 to =A1+2, jou can jump with 2, so 1,3,5,7,... But I assume that you'll use this column as a reference for sorting, so you can always go back to the original order.
Have fun!
Related
I have a file where there are several sheets referring to the same data but showing different values.
For example: Sheet A shows time spent in MD and sheet B shows time spent in MY
What I want to do is when I enter a value in sheet A (say 100), I want it to appear in the same row/column in sheet B but divided by a specific value (let's say 200)
Is there an easy way to do this for any cell in the sheet?
It's easy. On the dependent sheet, enter your factor as follows:
=1/200*
...and before you hit ENTER on the keyboard, use the mouse to navigate to the first sheet (I'll call it Sheet1) and click the cell you want to divide by 200, let's say cell B2. Now your formula should read,
=1/200 * 'Sheet1'!B2
Hit ENTER.
Now use fill down and fill right to populate the entire sheet with this formula, which will automatically change the cell reference to match whatever cell on the dependent sheet with an adjacent cell on Sheet1.
When you do this, you could write instead of B2, $B2, which will freeze the B column whenever you fill right or fill down. Or B$2, which freezes row 2... or $B$2, which never changes when you fill right or fill down.
Cheers!
Excel function to copy cell value above IF current cell is empty and another cell in same row is anything but empty. Otherwise, do nothing, and leave current cell value in place (empty or not.)
This is what I currently have =IF(AND(F48="",AJ61<>""),E47,E48). This works for a single specific line of data, but, then messes up when copied down the remainder of the column.
Example of what I need:
A B C
1] Apple___ Yes
2] ________ Yes
3] ________
4] Orange__ Yes
I need to Copy A1 (Apple) into A2 IF A2 is Empty and B2 is anything except empty. While not Copying A2 into A3 since that row is empty.
You can't enter/copy/fill a formula into a cell without overwriting the data that is already there. You need to enter the formula into just the blank cells. You can do this by:
Starting from the first cell where you want the formula, select to the last cell you want to contain the formula, including all the cells in between.
Then press Ctrl-G to open the Go to menu.
Click 'Special'
Select 'Blanks'
Click 'OK'
Put this formula into the formula bar:
=IF(COUNTA(B2:F2),A1,"")
Then press CTRL+ENTER to fill the formula into all selected cells.
This formula checks that B2:F2 is blank... change that range to match how much of the row you need to check as being blank.
Simple one for someone hopefully. I'm trying to get the max length of each column in an excel sheet but it doesn't seem to be working now. I was using =MAX(LEN(A2:A200)) for example and because MAX is not an "official" formula but is still there you seem to have to press CTRL + ALT + SHIFT once you have finished typing it.
When I do this it puts curly brackets round the whole formula like this {=MAX(LEN(A2:A200))} but if I click into the cell they disappear. the length of the first column will appear but then if I autofill to the next column it shows same length of column data from the first column rather than calculating the next column.
Perhaps not a straight up programming question but scratching my head why this is not working now. I'm trying to show max length of each column above header column in new row.
Thanks
Andrew
In A1 enter the array formula:
=MAX(LEN(A2:A200))
then stop clicking.
Move to A1 with the ARROW keys. Touch Ctrl+c. Then paste to B2 through G2 using Ctrl+v:
This will put the array formula in the destination cells.
Use Gary's formula and instead of ENTER, do CTRL-SHIFT-ENTER
When I do this it puts curly brackets round the whole formula like this {=MAX(LEN(A2:A200))} but if I click into the cell they disappear. the length of the first column will appear but then if I autofill to the next column it shows same length of column data from the first column rather than calculating the next column.
It is right to use formulas with brackets (they are called Matrix formulas). The brackets disappears because when you edit the content of the cell you have to push Ctrl + Shift + Enter and not only Enter like normal formulas.
Let's assume all your data is in Sheet1 starting at cell A1.
Create Sheet2
Enter the =LEN(Sheet1!A1) formula in cell A1 on Sheet2
Pull Sheet2's A1 cell down/over to the right to cover the populated
range of Sheet1 (to copy the formula to every cell of the range in
scope) - this will give you the length of every cell in scope
Enter the =MAX(A1:A10) formula on Sheet2 in the first column below
the last line (A10 is assumed to be the last line of the first
column in this example - so the formula goes in A11)
Pull Sheet2's A11 cell over to the right till the last column to get
the MAX length of values for each column
I need to subtract the minimum of that column from all rows of the column in Excel. I have one million rows and I cannot drag the right corner of the cell box all the way down to apply the formula to all those cells. I unfortunately haven't found anything that works. I want to subtract the minimum of a column from each cell of that column divide by 1000 and store in another column:
=(B1-MIN(B:B))/1000
How do I apply this to all rows of the column where I want this to work?
How do we apply formulas in general to all rows of a column in general?
Several ways to apply a formula to a new column in a large data set:
Option 1 - turn the data into a table: Assuming the data has headers, select the data and hit Ctrl-T or use Insert > table and tick the box "My table has headers". Now enter a name for the new calculated column and below the header enter the formula. It will automatically be applied to all rows in the table.
Option 2 - Enter the formula in the first row of next empty column of the data range. Then double click the fill handle (the lower right-hand corner of the selected cell) to fill the formula all the way down to the last row of the data range
Option 3 - Select the cells where the new formula should go. Easiest might be to start at the bottom end of the data and use Ctrl-Shift-up arrow to select up to the top. Adjust the selection to suit and hit Enter or Shift-Enter to make the top cell the current cell. Enter the formula and confirm it with Ctrl-Enter. It will be applied to all selected cells.
Copy the column, say it's A. In a couple of spare cells enter:
=MIN(A:A)
and
1000
Copy the formula cell, Paste Special..., Values over the top. Copy that cell, select the copy of ColumnA, Paste Special..., Operation Subtract. Copy the cell containing 1000, select the copied column, Paste Special..., Operation Divide. Filter ColumnA to select blanks and delete the contents on the copied column for the selected rows.
I want copy the column A formula into row 1 like this :
A B C D
1 ='sheet1'!B2.......='sheet1'!B3............='sheet1'!B4............='sheet1'!B5
2 ='sheet1'!B3
3 ='sheet1'!B4
4 ='sheet1'!B5
5 ='sheet1'!B6
but when I copy the formula from column A to B, the cell(B1) will become ='sheet1'!C3, are there any way transpose the formula without change one by one?
When you right-click (to paste your copied selection), it comes up with a Paste Special option. Click this and select Transpose. This should do it for you.
And changing the B3 (in your formula) to $B3 should stop it changing the formula