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:
Related
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))),)
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)
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.
I have a sheet in which I need to check the value of a cell against all the values in a column in an external sheet and if it matches copy an earlier cell in the matched cells row.
This is perfect for a single cell check:
=IF(E2=(external.xlsx!D2),(external.xlsx!A2),"")
...but what if I want to check if E2 matches D2:D500 and if do copy A2:A500 respectively?
The data below may help to clarify:
MASTER SHEET
COLUMN E COLUMN F
2 - 0007597_halka_kamila.jpeg
3 - 0007597_halka_kamila.jpeg
4 - 0007597_halka_kamila.jpeg
5 - 0007715_komplet_elena.jpeg
6 - 0007715_komplet_elena.jpeg
7 - 0007715_komplet_elena.jpeg
8 - 0007913_podomka_erika.jpeg
9 - 0007913_podomka_erika.jpeg
EXTERNAL SHEET
COLUMN A COLUMN D
2 - HALKA KAMILA 0007597_halka_kamila.jpeg
3 - HALKA KAMILA 0007597_halka_kamila.jpeg
4 - HALKA KAMILA 0007597_halka_kamila.jpeg
5 - KOMPLET ELENA 0007715_komplet_elena.jpeg
6 - KOMPLET ELENA 0007715_komplet_elena.jpeg
7 - KOMPLET ELENA 0007715_komplet_elena.jpeg
8 - PODOMKA ERIKA 0007913_podomka_erika.jpeg
9 - PODOMKA ERIKA 0007913_podomka_erika.jpeg
So in the example above I need the formula in Master Sheet Column F2 to check for a match against every single cell in External Sheet Column D. If there is a match then the corresponding value from External Sheet Column A is copied to Master Sheet F2 which would hopefully give:
MASTER SHEET DESIRED RESULT
COLUMN E COLUMN F
2 - 0007597_halka_kamila.jpeg HALKA KAMILA
3 - 0007597_halka_kamila.jpeg HALKA KAMILA
4 - 0007597_halka_kamila.jpeg HALKA KAMILA
5 - 0007715_komplet_elena.jpeg KOMPLET ELENA
6 - 0007715_komplet_elena.jpeg KOMPLET ELENA
7 - 0007715_komplet_elena.jpeg KOMPLET ELENA
8 - 0007913_podomka_erika.jpeg PODOMKA ERIKA
9 - 0007913_podomka_erika.jpeg PODOMKA ERIKA
The objective is to then copy the formula so it can run against the 500 or so rows I have. Appreciate any advice and help.
Would a lookup work for you? The formula in G1 is
=IFERROR(INDEX($A$1:$A$10,MATCH(E1,$D$1:$D$10,0)),"")
copied down.
Edit: this is for the data as described in your edited question. Starting in F1 and copy down. If you start in F2, change the Match(E1.... to Match(E2....
=IFERROR(INDEX(external.xlsx!A:A,MATCH(E1,external.xlsx!D:D,0)),"not found")
I have 3 columns. 3rd column is in sorted way which is numbers from 1 to 7.
2nd and 3rd column ares number between 0 to 9.
I want to search numbers in 3rd column between A1 to B7.
i have used the below formula to calculate the same and i am getting correct.
=IF(ISERROR(VLOOKUP(C1,A:A,1,FALSE)),IF(ISERROR(VLOOKUP(C1,B:B,1,FALSE)),"Not found","Found"),"Found")
However when am using full block(A1:B7) it is not working.
=IF(ISERROR(VLOOKUP(C2,$A$1:$B$7,1,FALSE)),"Not found","Found")
Considering N number of columns, how can we achieve the same.
2 7 1 Found
4 5 2 Found
6 4 3 Found
7 2 4 Found
2 1 5 Not found
3 9 6 Found
1 2 7 Found