| View previous topic :: View next topic |
| Author |
Message |
wylackii Newbie

Joined: 12 May 2010 Posts: 3
|
Posted: Wed May 12, 2010 4:21 pm Post subject: Auto filling rows with columns |
|
|
When I try to autofill rows from sheet 1 with columns from sheet 2 the column letter doesn't go up by one. I am trying to auto fill column B with data for each row coming from another sheet.
b2=Sheet2.b31, b3=Sheet2.c31, b4=Sheet2.d31, ect.
When I click the corner and drag down it fills b31,b32,b33,b34, etc.
I am looking for a way to increment the letter/column by one. I manually did 5 to see if auto fill would work but it just copied and repeated the 5 I entered. |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1851 Location: Sydney, Australia
|
Posted: Thu May 13, 2010 2:18 am Post subject: |
|
|
One way using OFFSET... | Code: |
=OFFSET(Sheet2.B$31;ROW($A1)-1;0) |
If you don't want the zeros that are returned when the Sheet2 cell is blank you can include the T function if you're working with text values...
| Code: | | =T(OFFSET(Sheet2.B$31;ROW($A1)-1;0)) |
or... | Code: | | =IF(OFFSET(Sheet2.B$31;ROW($A1)-1;0)="";"";OFFSET(Sheet2.B$31;ROW($A1)-1;0)) | if numbers or numbers and text are involved.
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
wylackii Newbie

Joined: 12 May 2010 Posts: 3
|
Posted: Thu May 13, 2010 1:23 pm Post subject: thanks |
|
|
| I will try this, I was looking for solution but couldn't come close. I tried this in Excel and it did the same thing with column not auto filling down the rows. |
|
| Back to top |
|
 |
wylackii Newbie

Joined: 12 May 2010 Posts: 3
|
Posted: Thu May 13, 2010 3:11 pm Post subject: Tried |
|
|
I tried it but when i clicked and dragged for auto fill the a1 auto filled (a1, a2, a3, ect.)
So I have data on sheet 2 in the range of B31:(so far HB)31 and I want to put it on sheet 1 in the range of B2:B(212 so far). Trying to auto fill only works for column to column or row to row and not any mix. One way to get around this is to have my chart take the data directly from sheet 2 but I still want to know how to solve this for future problems. |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1851 Location: Sydney, Australia
|
Posted: Thu May 13, 2010 3:42 pm Post subject: |
|
|
Oops!
Sorry about that.
I put the OFFSET arguments the wrong way around.
Try...
| Code: | | =OFFSET(Sheet2.B$31;0;ROW($A1)-1) |
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
stevesaunders OOo Advocate


Joined: 26 Dec 2009 Posts: 408
|
Posted: Thu May 13, 2010 7:05 pm Post subject: paste special |
|
|
copy your row on sheet 1 / got to sheet 2 / select a cell / Edit / Paste Special / Options / Transpose _________________ Steve ~ Tennessee USA
Mac OS X 10.6.2 Open Office 3.1 |
|
| Back to top |
|
 |
|