Example:
Worksheet 1
id category
1 dog
2 cat
....
Worksheet 2
name , dog , cat ....
However the first worksheet will grow so I can't use a paste special and when I link the cells =worksheet1!B2 and when I drag the fill handle downwards it gives the result I want. How would I achieve this because when I drag the fill handle sideways it doesn't give the desired affect
Thanks
In my screenshot I've kept everything on one page so it is easier to see everything in one spot.
The code used is: =INDEX($B:$B,COLUMNS($E$1:E1)+1)
or =INDEX($B:$B,COLUMNS($D$1:E1))
+1
so it doesn't return the word "category"; as an alternative, in the second example, I just move the starting absolute reference one cell to the left. If you have any questions about this method or its implemntation, please feel free to ask.
Sample File: HERE
You can write the formula as below:
=INDIRECT("worksheet1!B"&COLUMN(B1))
And then drag it to the right.
Indirect is usually something to avoid. In your example, if you move a cell or change the name of the first worksheet it will not work anymore.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.