Copy&Paste Data Multiple Criteria Excel - excel

I need to copy information from one table into another table and i am not sure how to do that.
So that would be my initial table:
Date 1 Date 2 Date 3
Part A 122 134 1212
Part B 453 3 4536
Part C 35 23 3
I need to copy that information into another table with different outline:
Part A Part B Part C
Info 1 - - -
Date1 Info 2 122 453
Info 3 - - -
Info 1 - - -
Date 2 Info 2 134 3
Info 3 - - -
Info 1 - - -
Date 3 Info 2 1212 4536
Info 3
How could i copy& paste the information into the new table?I think Index Match would work but not sure how.

Assuming you table starts from cell A1 as below,
Enter the formula in cell C2 as below,
=IF(MOD(ROW(),3)=0,OFFSET(Sheet5!$A$1,(COLUMN()-2),(ROW()/3)),"")
Drag it to the right and then down to complete the range. This formula refers Sheet5 which you can change it per your needs.

Related

Change cell reference when adding a new row in base sheet

I have 2 excel files: base sheet in the 1.xlsx with raw data and formula sheet for formulas in 2.xlsx
base file 1.xlsx:
1 - 1
2 - 2
3 - 3
4 - 4
5 - 5
formula sheet in 2.xlsx
1 - ='basesheet'!A1
2 - ='basesheet'!A2
3 - ='basesheet'!A3
4 - ='basesheet'!A4
5 - ='basesheet'!A5
Then I insert a new row in the base sheet 1.xlsx:
1 -
2 - 1
3 - 2
4 - 3
5 - 4
6 - 5
I want my cell references in the formula sheet in 2.xlsx updated, so I have
1 - ='basesheet'!A2
2 - ='basesheet'!A3
3 - ='basesheet'!A4
4 - ='basesheet'!A5
5 - ='basesheet'!A6
is it possible and how can I do that?
P.S. Data is very large, this is just a simple case
This already is an inbuilt feature in excel
EDIT: This applies not only to Worksheets but also to
Workbooks:

Increment a number within a formula by 2 each time

As in this image:
I have the following formula in merged cellset F229:F231, which works correctly:
=OFFSET('Food Diary'!$A$2,31*(ROWS($F$18:F229)-3),)
This pulls data from another worksheet - in this case the value 73.0 is pulled (there are similar formulas in the cell range H229 to M231.
Essentially I want the -3 part at the end of above OFFSET formula to increment by two each time I copy and paste the three row set. So in the merged cellset of F232 - F234 it would be -5 and in the next one it would be -7, then -9 etc.
It's a bit of a hack but this would result in the correct data being pulled. This is not a work spreadsheet, just a personal log to record my food etc so doesn't have to be ideal.
Change -3 to +2*Row()/3 + c, where c is a modifier to ensure that your first row lines up
For example, if the first row is line 4, and you want the value to be 2:
- 2 * Row() / 3 + c
- 2 * 4 / 3 + c
- 8 / 3 + c
- 2.666 + c
c = - 1/3
- 2.666 - 1/3
- 3
- 2 * Row() / 3 - 1/3
Then, when you copy it down to Row 7:
- 2 * Row() / 3 - 1/3
- 2 * 7 / 3 - 1/3
- 14 / 3 - 1/3
- 4.666 / 3 - 1/3
- 5
Use one of the following formula for your counter starting at -3 and changing by -2 every three rows. You can either start using row A1 or you can reference your current cell and make some adjustments to the formula to achieve the same result.
=-3-2*(ROUNDUP(ROW(A1)/3,0)-1)
or
=-3-2*(ROUNDDOWN((ROW(G229)-ROW($G$229))/3,0))
both will work for generating the number you are looking for
Your final formula might look like:
=OFFSET('Food Diary'!$A$2,31*(ROWS($F$18:F229)+(-3-2*(ROUNDUP(ROW(A1)/3,0)-1))),)

Using SUMIFS to sum all rows matching one criteria within a column matched by another criteria

I think I'm very close to what I want but I'm still getting an #N/A error -
I have some wage sheets that cross reference a labour table 'Table1' which stores the information of my employees (Pay code, Site, Contracted Hours etc). In Table1 I have columns titled 1-10 which values.
On the wage sheet I have a cell 'AM3' that will be a number between 1-10. Depending on that cell, the cell below should sum up all values in that column for all staff at that particular site.
For example - I have a wage sheet for site 'EXAMPLE SITE' which is stored in cell C2 and cell AM3 = 9.
I am trying to use the following formula to make this work:
=SUMIFS(INDEX(Table1,,MATCH(AM3,Table1[#Headers]),0),Table1[[Site]:[Site]],$C$2)
That is, I'm checking Table1, and finding the column headed with the value contained in cell AM3 (with an exact match). criteria_range1 is the Site column and criteria1 is 'EXAMPLE SITE' stored in C2.
I would expect this to sum every cell in column header 9, matching Site 'EXAMPLE SITE'. But I just get the #N/A error.
Table1:
Name - Site - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10
Tom - EXAMPLE SITE - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 10 - 20
Geoff- EXAMPLE SITE - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 9 - 18
Sarah- RANDOM SITE - 0 - 0 - 0 - 0 - 0 - 0 - 5 - 15 - 25 - 40
With that example I want the formula to return '19' as a numerical value. I feel like I'm just being dumb but no amount of googling is helping me.
MATCH seems to be having a hard time with matching table headers with numeric values. Try this:
=SUMIFS(INDEX(Table1,,MATCH(AM3,INDEX(Table1[#Headers]*1,),0)),Table1[[Site]:[Site]],$C$2)
Same problem with MATCH as earlier but alternate resolution.
=SUMIFS(INDEX(Table1[[1]:[10]],0,MATCH(TEXT(AM3, "0"),Table1[[#Headers],[1]:[10]],0)),Table1[Site],C2)

Get data from table with multiple criteria Excel

So i have information stored in a table. The columns are the date und rows are the Part. So i have another workbook open with different dates and parts but the table looks completely differnt with some addition rows in between. So i cant just copy&paste the data. I need a vba code to search for the correct entry and copy paste each single value. Similar to a index match function but in vba.
Could you give me some help how to start this?
So that would be my initial table:(Information 2)
Date 1 Date 2 Date 3
Part A 122 134 1212
Part B 453 3 4536
Part C 35 23 3
I need to copy that information into another table with different outline:
Part A Part B Part C
Info 1
Date1 Info 2 122 453
Info 3
Info 1
Date 2 Info 2 134 3
Info 3
Info 1
Date 3 Info 2 1212 4536
Info 3
How could i copy& paste the information into the new table?
How could i do that with index &match funtion?

Excel with rows of details related to other row

There is a way to have a group of rows related to other one, in the same sheet, like a more detailed information? Obviously must keep them always next to the main row if you filter or sort.
Desired example based on vehicles and travels:
A B C D
1 [ID] [VEHICLE TYPE] [BRAND] [COLOUR]
+ 2 A-171 PICKUP HONDA BLACK
- 3 [TRAVEL] [KM] [STATION]
- 4 12/08/2016 13.000 BARCELONA
- 5 13/08/2016 13.750 DONOSTI
+ 6 B-501 VAN RENAULT WHITE
- 7 [TRAVEL] [KM] [STATION]
- 8 12/08/2016 117.800 PARIS
- 9 13/08/2016 120.000 AMSTERDAM
- 10 14/08/2016 124.320 MUNICH
So when you sort the spreadsheet, should keep always the travel rows next to the vehicle row.
It is that possible? If not, what can I do to get this or similar? (I don't mind to use other sheet tab, but it wasn't the ideal)
You can use the Group function (Alt-A-G-G), and they won't be sorted as usual if you use sort on the whole column

Resources