copy rows after each other excel - excel

I have a Microsoft excell file: I want to copy 2 rows and add these to the previous row (the first row). I give an example:
row1 -> 0027448 R 3 1 203,45 22375 EDS001 name1 name1 eds1
row2 -> 0027448 R 3 1 203,45 22375 EDS001 name2 name2 eds1
row3 -> 0027448 R 3 1 203,45 22375 EDS001 name3 name3 eds1
My question is: how can I copy row1, row2 and row3 after each other:
course without manually copying. but through formulas!
row1 ... row2 ... row3 ....

This program made ​​me more or less a good solution. Better solutions are still welcome!
I got the Excel plugin from this website: ASAP Utilities

How can I copy row1, row2 and row3 after each other? Of course without manually copying.
If you need copying after each other vertically, row by row, that seems to be simple.
In the very left cell of town you can just paste link to the very first cell of row1 (like: =A1).
Stretch it horizontally, then stretch the whole row1 (with formulas) vertically to the bottom.
This will copy itself, so rows 4,5,6 will copy rows 1,2,3.
Rows 7,8,9 will copy rows 4,5,6 (and again, it will be equal to rows 1,2,3) and so on as long as you need.

Related

Excel question on addition with integers and string values

I need to fill in the cells below ROW1 with adding 2 onto the last number. Example below:
ColA ColB ColC
ROW1 G385 G384 G288
ROW2
ROW3
Desired result
ColA ColB ColC
ROW1 G385 G384 G288
ROW2 G387 G386 G290
ROW3 G389 G388 G292
Right now if I drag and drop the cells in row1, the results will increase by 1, I need them to increase by 2.
Any ideas?
The formula I think you're looking for is:
= "G" & Value( right( B2, len(B2)-1)) + 2
This takes "G" and adds it to the beginning of the solution. The math take the value of all the characters right of the G and adds 2.

excel to put sequence number but skipping two rows

I need one help regarding excel. I want to add the sequence number in sheet 1 from sheet 2 by
skipping 2 rows in between. For e.g. as defined below. Row1 will lookup 1 from sheet 2, row 2 & row 3
should be blank and then row 4 will pick 2 from sheet2
Sheet1 Sheet2
Row1 >>1 1
Row2 >>blank 2
Row3 >>blank 3
Row4 >>2
=IF(ROW()/3=INT(ROW()/3),INDEX(Sheet2!A:A,ROW()/3),"")
This assumes you start at row 1. And that the sheet 2 stuff is all in column A.

Find the corresponding value in a separate table depending on another table in Excel

I am trying to find the value in one table (Table 2), based on the location of a "Yes" in another table (Table 1). See below:
Table 1
Header1 Unique1 Unique2 Unique3
Row1 Yes
Row2 Yes
Row3 Yes
Table 2
Header1 Unique1 Unique2 Unique3
Row1 XXX
Row2 YYY
Row3 ZZZ
On another sheet, I have a column with "Unique1" or "Unique2" as follows and am trying to get the column that is labeled "Lookup":
Column1 Lookup
Unique1 XXX
Unique1 XXX
Unique3 ZZZ
Unique2 YYY
I am glad you got it working. I actually did manage to cram it into one formula.=INDEX(Sheet1!$A$5:$D$8,MATCH("Yes",INDIRECT("Sheet1!"&CHAR(CODE("A")+MATCH($A2,Sheet1!$1:$1,0)-1)&":"&CHAR(CODE("A")+MATCH($A2,Sheet1!$1:$1,0)-1)),0),MATCH($A2,Sheet1!$1:$1,0))
The way that works is it goes into your table 2 and picks out a row and a column. The column is whichever holds the name. The row gets constructed by looking for yes in the appropriate column. To name that column with a letter and not a number, I needed to convert with the whole CHAR CODE thing.

Excel: search value in array and fetch row and column name

I have a spreadsheet of available samples across 45 boxes, arranged stacked with column headers from 1 to 10 and row headers from A to J. I'm looking for a way to fetch the box, row and cell number if I lookup an ID (prefixed with B).
Sheet 1 is a list of animal IDs that I want to know if a sample is available for
Sheet 2:
Box 1
1 2 3 4 5 ... 10
A B43 B12 B3 B6 B103
B B13 B14 B78 B51 B63
C B78 B33 B99 B43 B92
...
J
Box 2
1 2 3 4 5 ... 10
A B2 B6
I have tried doing nested if functions by columns:
if(match(A2, Sheet2!$B$2:$B$521,0),"1",if(match(A2,Sheet2!$C$2:$C$521,0),"2","")
...but I've been getting #N/A if A2 is in column C.
I've resorted to re-labelling the left-most column to Box 1 A, Box 1 B, Box 1 C... so on, and doing:
=index(Sheet2!$A$2:$A$521,match(A2,Sheet2!$B$2:$B$521,0),0)
...and duplicating the function for **Columns 1 to 10*.
Sheet 1:
Animal ID Col1 Col2 Col3 Col4 ...
B12 . Box 1 A . .
B43 . . . Box 1 C
...
Is there an easier way to fetch the location of a sample from an array?
If your Sheet2 looks like this.
and you want the data like this in Sheet1.
Then enter this formula in Cell B2 of Sheet1 and drag it down and across.
=IFERROR(CONCATENATE(INDEX(Sheet2!$A:$A,(MATCH($A2,Sheet2!B:B,0))-MOD(MATCH($A2,Sheet2!B:B,0)-1,12),)," - ",INDEX(Sheet2!$A:$A,MATCH($A2,Sheet2!B:B,0))),".")

Need to match data in different sheets and replace data in another cell if it's a match

I need to match data in column A2 and so on in sheet 1 to data in column A2 and so on in sheet 2. If the data in column A of sheet 1 and sheet 2 match I need the data in column B & C of sheet 2 to replace data in column B & C of sheet 1. I know VERY little about doing this kind of stuff so any help would be GREATLY appreciated!
SHEET 1
A B C
2 12345 5.35 9.95
3 15874 4.22 10.99
4 11111 2.24 5.99
5 98745 5.33 9.95
6 88552 4.24 8.95
SHEET 2
A B C
2 11111 2.09 5.79
3 12345 5.11 9.89
4 88552 4.01 8.79
NEED SHEET 1 to change to
A B C
2 12345 5.11 9.89
3 15874 4.22 10.99
4 11111 2.09 5.79
5 98745 5.33 9.95
6 88552 4.01 8.79
On a third sheet use these functions
column a ='sheet1'!a2
column b =if('sheet1'!b2='sheet2'!b2,'sheet2'!b2,'sheet1'!b2)
column c =if('sheet1'!c2='sheet2'!c2,'sheet2'!c2,'sheet1'!c2)
Copy sheet3 and paste the values into sheet1.
This should work unless column a does match. or if you need to do this dynamically. If column a doesn't match some vlookups can be thrown in.
I your data does match in column a your formulas could look something like this.
column a ='sheet1'!a2
column b =if(not(iserror(vlookup(a2,'sheet2'!a:c,2,false))),vlookup(a2,'sheet2'!a:c,2,false),vlookup(a2,'sheet1'!a:c,2,false))
column c =if(not(iserror(vlookup(a2,'sheet2'!a:c,3,false))),vlookup(a2,'sheet2'!a:c,3,false),vlookup(a2,'sheet1'!a:c,3,false))
this is too much to put in a comment so I'm putting it in answer.
The way I under stand is, since sheet1 has more data, you only want to be doing this comparison when sheet1 and 2 both have data on the row. so If sheet1 has data in rows 1 - 100, and sheet2 has data in rows 1 to 50, you only want to be doing this comparison for the first 50 rows in sheet1 right?
So, rather than copying and pasting formulas, what you can do is, in sheet1, find an unused column. go to the first row. in the formula box, type: "=if(" without the quotes. now, select the first cell to compare, according to your example you'd select sheet1, A2. then type "=" without quotes. then select the second cell you want to compare - in your example, sheet2, A2. then type "," without quotes. then select the cell from which you want the data if the first 2 cells are equal. in your example, sheet2 B2. then type "," without quotes, then select the cell with the data to use if the first 2 cells are not equal. in your example, sheet1 b2. then type ")" without the quotes.
so using your example, the function would look similar to how bigtree had it: =if('sheet1'!A2='sheet2'!A2,'sheet2'!b2,'sheet1'!b2)
so, this will compare sheet1 cell A2 with sheet2 A2 and if they are equal, the cell you put the formula in will the have the value of sheet2 b2, and if they are not equal, the cell with this formula will have the value of sheet1 B2. then, drag this formula down for however many rows you want, and the formula will adjust automatically for each row. you'll see the numbers increase. then, select the column with the formulas, right click and select copy, then right click and go to paste special, and click values. this will make it so the column contains only the values, not the formulas, now you can paste this data in column B sheet 1.
you can reuse this formula for whatever columns, just follow the steps.
HTH, good luck!

Resources