Fill down with a twist.

Hey folks,

If a cell A1 contains '=B1' and I fill-down from A1 to A3, I get
references to B2 and B3 for the two new cells.

Is it possible to fill down, but scan right? E.g. make A2 become C1
and A3 become D1?

Thanks,

Hi Martin,

I haven't tested this myself yet, but I would suspect, that if you fill in
the first two or three cells manually, then mark all 3 cells and use the
mouse to fill in the rest, it will do what you want.

Sigrid

also sprach Sigrid Carrera <sigrid.carrera@gmail.com> [2014-09-19 10:18 +0200]:

I haven't tested this myself yet, but I would suspect, that if you
fill in the first two or three cells manually, then mark all
3 cells and use the mouse to fill in the rest, it will do what you
want.

Good idea, but unfortuately, it does not work.

If the two cells are B1 and C1 with references to A1 and A2, then
selecting both cells and extending the selection right will create
pairs of B1/B2 and C1/C2. The same applies to vertical
extension/filling.

Hi :slight_smile:
I'm not completely sure why you are trying to do this. Context could be
useful.

Maybe what you are looking for is something involving

Edit - "Paste Special" - tick the "transpose" box

For example if cell
B1 = 1
C1 = 2
D1 = 3
E1 = 4
then you can select B1-E1, (Ctrl c or another way to copy), click on cell
A2 and then doing
Edit - "Paste Special" - transpose
gives
A2 = 1
A3 = 2
A4 = 3
A5 = 4

If you extend that idea so that
B2 = B1
C2 = C1
D2 = D1
E2 = E1
and then select B2-E2, cut (or copy), click in A2 and then do
Edit - PasteSpecial - transpose
then
A2 = B1
A3 = C1
A4 = D1
A5 = E1

It's not very elegant! It's worth knowing that if you click a cell and
don't try to drag the selection just use any scrolling method to get to the
end of the line and then
Shift click
then everything between the previous cell you clicked on and the new one
all gets selected. Also if you click on the first cell and then use
Shift Ctrl keyboard-arrow
then it takes you to where it thinks the end of the line is. You might
need to press the keyboard arrow a few more times without lifting your
finger(s) from
Shift Ctrl
to get to the real end. To adjust by 1 cell at a time try
Shift keyboard-arrow

There might be some other way that is more elegant.

I'd be tempted to go via a text-editor because it might be faster in some
cases. It risks losing formulas though so it might not be at all suitable
for your case. In the spreadsheet program do
File - "Save As..." - csv
maybe right-click on the csv to open in a text-editor such as Notepad or
GEdit or Kate or Leafpad or something and do "Find (or search) and replace"
to change all the commas into newline characters.

Hmmm, ok so the transpose method is probably more elegant than that!!
Regards from
Tom :slight_smile:

also sprach Tom Davies <tomcecf@gmail.com> [2014-09-19 12:37 +0200]:

I'm not completely sure why you are trying to do this. Context could be
useful.

I have a table with assumptions about conference days in a budget,
and the days are in columns left-to-right.

In the overview, I need the days to appear top-to-bottom. It's
*painful* to do this by hand.

Edit - "Paste Special" - tick the "transpose" box

This does almost what I want, except it copies values, and it does
not insert references.

If you extend that idea so that
B2 = B1
C2 = C1
D2 = D1
E2 = E1
and then select B2-E2, cut (or copy), click in A2 and then do
Edit - PasteSpecial - transpose
then
A2 = B1
A3 = C1
A4 = D1
A5 = E1

Right, except I would like A2 to be '=B2' and A3 to be '=C2' etc.

Does this make sense?

Hi :slight_smile:
Weird! I was expecting the last part to work. Just to check that we are
talking about the same thing - in that last part i meant;

Create (perhaps by inserting a new row 3 temporarily?)

B3 = '=B2'
C3 = '=C2'
D3 = '=D2'
E3 = '=E2'
etc and then select all them, copy and transpose 'into' A2 and onwards.

Does that not work?
Regards from
Tom :slight_smile:

also sprach Tom Davies <tomcecf@gmail.com> [2014-09-19 13:56 +0200]:

Create (perhaps by inserting a new row 3 temporarily?)

B3 = '=B2'
C3 = '=C2'
D3 = '=D2'
E3 = '=E2'
etc and then select all them, copy and transpose 'into' A2 and onwards.

Does that not work?

No. :frowning:

If I take that temporary row 3 and paste it into the four fields in
the destination column G1:G4, then the references get "rotated" too.

I.e. the result will be:

G1 = '=F1'
G2 = '=F2'
G3 = '=F3'
G4 = '=F4'

This is because row three in the above always references the cell
above, and after transposing with paste-special, the resulting cells
are modified to reference the respective cell to the left.

If I change B3:E3 to '=B$2':'=E$3', I get an error 522 in the
result, because the cells are now all '=G$2', which is
a self-reference.

If I change B3:E3 to '=$B2':'=$E2', I get the following weird
result:

G1 = '=$B#REF!'
G2 = '=C1'
G3 = '=D2'
G4 = '=E3'

But if I change B3:E3 to all absolute references, then it works.
Super! Thank you for that hint. It's a hack, but it works.

Hi,

If a cell A1 contains '=B1' and I fill-down from A1 to A3, I get
references to B2 and B3 for the two new cells.

Is it possible to fill down, but scan right? E.g. make A2 become C1
and A3 become D1?

This formula in A1 should behave as you desire:

=OFFSET($B$1;0;ROW()-ROW($B$1))

Cheers,
Stefan

also sprach Stefan Weigel <stefan.weigel@bildungskreis.org> [2014-09-19 18:55 +0200]:

This formula in A1 should behave as you desire:
=OFFSET($B$1;0;ROW()-ROW($B$1))

Yeah, I've since found OFFSET() as well, but as you can imagine, my
functions aren't just simple references, and using OFFSET() actually
makes it totally unreadable.

Tbh, I was also wondering why this isn't a use-case for a pivot
table, given that I simply pivot data 90°…

So use Edit | Paste Special... and tick both Transpose and Link under Options. Voilà!

Note that your intermediate column copy of your data can be out of the way elsewhere on the sheet, out of any print range - or even on a separate sheet.

I trust this helps.

Brian Barker