Is there any faster way to copy paste in Excel? - excel

I have a list of data that I need to keep copy paste with the same data
I found is stupid that I keep copy paste due to I have 10000 over data inside my excel sheet.
Is there any faster way to allow me copy paste the same data in few minutes?
Below will be my data:
A B C D E F G
1 17449 2JW3-1512-P2 NPJW3A3177 0.111 3.149 0.024 0.034
2 0129 3.100 0.026 0.033
3 0130 3.200 0.023 0.025
4 0131 3.159 0.024 0.015
5 17580 2JW3-1511-P2 NPJW3A3177 7129 3.160 0.025 0.015
6 7130 3.140 0.025 0.014
7 7180 3.214 0.023 0.011
Is there any faster way that I want A2:C4 will fill in with the data same as A1:C1
while A6:C7 will fill in with data same A5:C5

Try doing this. First move your data down one row to give you a empty first row. Then in H2 put this formula:
=IF(A2="",H1,A2)
Now copy that across two columns and down to the bottom of your data.
Then your spreadsheet would look like this:
+---+-------+--------------+------------+-------+-------+-------+-------+-------+--------------+------------+
| | A | B | C | D | E | F | G | H | I | J |
+---+-------+--------------+------------+-------+-------+-------+-------+-------+--------------+------------+
| 1 | | | | | | | | | | |
| 2 | 17449 | 2JW3-1512-P2 | NPJW3A3177 | 0.111 | 3.149 | 0.024 | 0.034 | 17449 | 2JW3-1512-P2 | NPJW3A3177 |
| 3 | | | | 129 | 3.1 | 0.026 | 0.033 | 17449 | 2JW3-1512-P2 | NPJW3A3177 |
| 4 | | | | 130 | 3.2 | 0.023 | 0.025 | 17449 | 2JW3-1512-P2 | NPJW3A3177 |
| 5 | | | | 131 | 3.159 | 0.024 | 0.015 | 17449 | 2JW3-1512-P2 | NPJW3A3177 |
| 6 | 17580 | 2JW3-1511-P2 | NPJW3A3177 | 7129 | 3.16 | 0.025 | 0.015 | 17580 | 2JW3-1511-P2 | NPJW3A3177 |
| 7 | | | | 7130 | 3.14 | 0.025 | 0.014 | 17580 | 2JW3-1511-P2 | NPJW3A3177 |
| 8 | | | | 7180 | 3.214 | 0.023 | 0.011 | 17580 | 2JW3-1511-P2 | NPJW3A3177 |
+---+-------+--------------+------------+-------+-------+-------+-------+-------+--------------+------------+
You can now copy columns H2:J8 over to A2:C8 (or as far down as you need to go) and in one copy/paste you're done. Make sure you paste values, not formulas.

Select A:C, HOME, Editing,- Find & Select, Go To Special..., Blanks, OK
=, ↑, Ctrl+Enter
then copy down the last entries in ColumnsA:C to suit.

Just select A1:C1 together, and then drag the bottom right cross (fill handle) down to fill in A2:C4.
Similarily, select A5:C5 together and fill A6:C7 with data by dragging the cross down again.
Alternatively, if you have large range of cells to fill, you can also use the Fill Button in the menu. For example, if you wanted to fill A5:C5 downwards for say 100 rows, you can do this:
Put in the inital data for A5:C5.
In the Excel Name Box, type in A5:C105 and press enter (the Name Box is located left of the formula bar). A5:C105 should now all be selected.
On the Home Ribbon tab > Editing Group > Fill, Select the "Down" option.
Now each row in A5:C105 should be filled exactly with whatever was in A5:C5.

Related

Looking to create weighted average of partitioned columns in Excel

Horrible title, but I couldn't find a way to describe what I'm trying to do concisely. This question was posed to me by a friend, and I'm usually competent in Excel, but in this case I am totally stumped.
Suppose I have the following data:
| A | B | C | D | E | F | G | H |
---------------------------------------------------------------------
1 | 0.50 | 0.50 | 1 | | | 0.30 | 0.30 | |
2 | 0.25 | 0.75 | 2 | | | 0.40 | 0.70 | |
3 | 1.00 | 1.75 | 8 | | | 0.30 | 1.00 | |
4 | 0.75 | 2.50 | 2 | | | 0.50 | 1.50 | |
5 | 1.25 | 3.75 | 3 | | | 1.75 | 3.25 | |
6 | 0.50 | 4.25 | 1 | | | 0.25 | 3.50 | |
7 | 1.00 | 5.25 | 0 | | | 0.50 | 4.00 | |
8 | 0.25 | 5.50 | 2 | | | 0.30 | 4.30 | |
9 | 0.25 | 5.75 | 9 | | | 0.25 | 4.55 | |
10 | 0.75 | 6.50 | 4 | | | 0.70 | 5.25 | |
11 | | | | | | 1.00 | 6.25 | |
12 | | | | | | 0.25 | 0.25 | |
Column A represents the distance traveled while the measurement in column C was collected. Column B represents the total distance traveled so far. So C1 represents some value produced during the process from distance 0 to 0.5. B2 represents the value from distance 0.5 to 0.75, and B3 represents the value from 0.75 to 1.75, etc...
Column F represents a PLANNED second iteration of the same process, but with different measurement intervals. What I need is a way to PREDICT column H, based on a WEIGHTED AVERAGE of values from column C, based on where the intervals in column F intersect with the intervals in column A. For example, since F2 represents the measurement taken from distance 0.30 to 0.70 (an interval of 0.4, split 50/50 across the measurements in C1 and C2), H2 would be equal to: C1*0.5 + C2*0.5: 1.5.
Another example: H3 represents the expected measurement from an interval between 0.7 and 1.0, which is split between C2 (from 0.7 to 0.75 = 0.05) and C3 (from 0.75 to 1.0 = 0.25). So H3 = 16.6%*C2 + 83.3%*C3 = 0.332+6.664 = 6.996.
I'm looking for a way to do this in an Excel spreadsheet without using VBA or breaking it down into something like a Python script to process externally, but so far I'm not finding any way to do it.
Any ideas for accomplishing this entirely within Excel without any special add-ins/scripts installed ?
It's not pretty, but I think the following should work for all except H1 (which would need an added zero row):
=(MAX(0,INDEX(B:B,MATCH(G2,B:B,1))-G1)*INDEX(C:C,MATCH(G2,B:B,1)) +
(G2-INDEX(B:B,MATCH(G2,B:B,1)))*INDEX(C:C,MATCH(G2,B:B,1)+1)) /
MAX(G2-G1,G2-INDEX(B:B,MATCH(G2,B:B,1)))
It matches the values in B and C and weights them accordingly.

Count text occurrences in a column in Excel

I have the following list in Excel:
+-------+----------+
| am | ipiresia |
+-------+----------+
| 50470 | 29 |
| 50470 | 43 |
| 50433 | 29 |
| 6417 | 51 |
| 6417 | 52 |
| 6417 | 53 |
| 4960 | 25 |
| 4960 | 26 |
| 5567 | 89 |
| 6716 | 88 |
+-------+----------+
I want to add a column, let's say 'num' and count the occurrences of column 'am' in a row adding one when a new occurrence happens as follows:
+-------+----------+-----+
| am | ipiresia | num |
+-------+----------+-----+
| 50470 | 29 | 1 |
| 50470 | 43 | 2 |
| 50433 | 29 | 1 |
| 6417 | 51 | 1 |
| 6417 | 52 | 2 |
| 6417 | 53 | 3 |
| 4960 | 25 | 1 |
| 4960 | 26 | 2 |
| 5567 | 89 | 1 |
| 6716 | 88 | 1 |
+-------+----------+-----+
Is it possible to get this automatically with a formula in Excel?
yes,
my example:
(assume you start your table containing 3 columns at Excels origin at A1 without header lines)
Then fill C1 with value "1"
and then start in C2 with entering a formula
simple like this:
=if($A2=$A1;$C1+1;1)
then you drag C2 down at the cells downright located autofill position as far as you want. Most times also double click works to let Excel autofill the columns down to the end of you prefilled table.
If you need assistance for AutoFill press F1 in Excel an the help with tell you in detail.
Assuming the sample table starts at A1 (with headers) the following formula will provide the expected results even if the list is not sorted.
=COUNTIF($A$1:$A2,A2)
Enter the formula at cell C2 then paste it down to the last cell of the data (or use AutoFill)

Excel dynamic range in matrix

In my excel worksheet I have a matrix like this:
+---+------------+--------+--------+--------+--------+--------+-------+
| * | A | B | C | D | E | F | Col n |
+---+------------+--------+--------+--------+--------+--------+-------+
| 1 | 01/01/2000 | -1.000 | -1.000 | -1.000 | -1.000 | -1.000 | ... |
| 2 | 01/02/2000 | | 1.200 | 500 | 500 | 500 | ... |
| 3 | 01/03/2001 | | | 1.100 | 800 | 800 | ... |
| 4 | 01/04/2000 | | | | 1.000 | 700 | ... |
| 5 | 01/05/2000 | | | | | 900 | ... |
| 6 | 01/06/2000 | | | | | | ... |
| 7 | 01/07/2000 | | | | | | ... |
+---+------------+--------+--------+--------+--------+--------+-------+
I need a formula for each column (from column 2) with a dynamic range like this:
For Column B:
=XIRR(B1:B1,A1:A1)
For Column C:
=XIRR(C1:C2,A1:A2)
For Column D:
=XIRR(D1:D3,A1:A3)
For Column E:
=XIRR(E1:E4,A1:A4)
and so on.
Is it possible?
Thanks
I think what you are after is:
=XIRR(OFFSET(B$1,0,0,COLUMN()-1),OFFSET($A$1,0,0,COLUMN()-1))
Using OFFSET we can specify the number of rows in our offset range... We can use the COLUMN() number -1 to get 1 for B, 2 for C etc. We start the offset from an unfixed cell for the values (so it moves along the columns) and a fixed one for dates (so it stays in A)
This formula can just be copied along the cells as far as necessary...

Calculating median with three conditions to aggregate a large amount of data

Looking for some help here at aggregating more than 60,000 data points (a fish telemetry study). I need to calculate the median of acceleration values by individual fish, date, and hour. For example, I want to calculate the median for a fish moving from 2:00-2:59PM on June 1.
+--------+----------+-------+-------+------+-------+------+-------+-----------+-------------+
| Date | Time | Month | Diel | ID | Accel | TL | Temp | TempGroup | Behav_group |
+--------+----------+-------+-------+------+-------+------+-------+-----------+-------------+
| 6/1/10 | 01:25:00 | 6 | night | 2084 | 0.94 | 67.5 | 22.81 | High | Non-angled |
| 6/1/10 | 01:36:00 | 6 | night | 2084 | 0.75 | 67.5 | 22.81 | High | Non-angled |
| 6/1/10 | 02:06:00 | 6 | night | 2084 | 0.75 | 67.5 | 22.65 | High | Non-angled |
| 6/1/10 | 02:09:00 | 6 | night | 2084 | 0.57 | 67.5 | 22.65 | High | Non-angled |
| 6/1/10 | 03:36:00 | 6 | night | 2084 | 0.75 | 67.5 | 22.59 | High | Non-angled |
| 6/1/10 | 03:43:00 | 6 | night | 2084 | 0.57 | 67.5 | 22.59 | High | Non-angled |
| 6/1/10 | 03:49:00 | 6 | night | 2084 | 0.57 | 67.5 | 22.59 | High | Non-angled |
| 6/1/10 | 03:51:00 | 6 | night | 2084 | 0.57 | 67.5 | 22.59 | High | Non-angled |
+--------+----------+-------+-------+------+-------+------+-------+-----------+-------------+
I suggest adding a column (say hr) to your data (containing something like =HOUR(B2) copied down to suit) and pivoting your data with ID, Date, hr and Time for ROWS and Sum of Accel for VALUES. Then copy the pivot table (in Tabular format, without Grand Totals) and Paste Special, Values. On the copy, apply Subtotal At each change in: hr, Use function: Average, Add subtotal to: Sum of Accel then select the Sum of Accel column and replace SUBTOTAL(1, with MEDIAN(. Change Average to Median if required.

Excel Data Solutions

Here are my 2 columns:
| C | B |
| 378 | 124.14 |
| 378 | 0.47 |
| 378 | 125.00 |
| Total | 249.61 |
I would link Total data in another sheet but I could not find excel proper function.
It's a little hard to tell what your table looks like from what you've copied & pasted. Assuming it looks like this:
+---+-------+-------+
| | B | C |
+---+-------+-------+
| 1 | 378 | 124.14|
+---+-------+-------+
| 2 | 378 | 0.47|
+---+-------+-------+
| 3 | 378 | 125 |
+---+-------+-------+
+ 4 + TOTAL + 249.6 +
+---+-------+-------+
The address of your total is C4.
Call this worksheet Sheet1 and the file File1.xls.
To access cell C4 from another worksheet in the same file: =Sheet1!C4
To access cell C4 from another file: =[File1.xls]Sheet1!$C$4
This might be over-simplifying, but you can just click the target cell, type = then click on the source sheet and click on the total.

Resources