LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #19   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 172
Default Displaying items from a column list in another sheet?

Thanks Joel that works great and gives me some flexibility over where to copy
the list to.

Is there a way to achieve the same result if there are cells on a row on
Sheet 2 with breaks. So for example, row B5 is where the list starts but
cells E5 and F5 should be left blank and the repeating list continues from
cell G5?

Thanks again
Simon

"joel" wrote:

I change the reference from B5 to A5. Thought it was eaier to understand.
the A1 included the header row on sheet 1, A5 now includes header column.

=OFFSET(Sheet1!$A$1,MOD(COLUMN()-COLUMN($A$5)-1,COUNTA(INDIRECT("Sheet1!C"&ROW()-ROW($A$5)+1,FALSE))-1)+1,ROW()-ROW($A$5))


"simon" wrote:

Thanks Joel, that does work better. How would this work if the row in sheet 2
started at B5? Cell A5 contains the row label so I don't want that to be
listed.

Simon

"joel" wrote:

If in sheet 2 the table starts in A5

=OFFSET(Sheet1!$A$1,MOD(COLUMN()-1,COUNTA(INDIRECT("Sheet1!C"&ROW()-ROW($A$5)+1,FALSE))-1)+1,ROW()-ROW($A$5))

"simon" wrote:

Thanks Joel, that formula works but restricts the list to row A1 on sheet 2.
Is there a way to be able to specify any row on sheet 2 as I will need to use
this formula on different sheets with different row locations?

Thanks
Simon

"joel" wrote:

This function assume there is a header row in Sheet 1

In sheet 2 A1
=OFFSET(Sheet1!$A$1,MOD(COLUMN()-1,COUNTA(INDIRECT("Sheet1!C"&ROW(),FALSE))-1)+1,ROW()-1)

"pieman3" wrote:

I copied and pasted that formula but still get the reference error.



"joel" wrote:

The one is needed and $ are needed in front of the column A

=INDEX(Sheet1!$A$2:A$100,MOD(COLUMN()-1,COUNTA(Sheet1!$A$2:A$100))+1,ROW())

"pieman3" wrote:

This is the formula I just tried...

=INDEX(Sheet1!A$2:A$100,MOD(COLUMN()-1,COUNTA(Sheet1!A$2:A$100)),ROW())

But I get an invalid cell reference error. Have I missed something?


"joel" wrote:

Remove the "+1" from the formula

"pieman3" wrote:

I tried that but for some reason it always missed the first item in the list
and started at the 2nd item.

"joel" wrote:

There is nothing from stopping you from replacing Sheet1!$A:$A (2x) with
Sheet1!A$2:A$100

"pieman3" wrote:

Yeah sure...

Column A in sheet 1 has the list of products I need repeating on Sheet 2 but
this column also contains a text heading in the cell above the product list.
With your first formula suggestion the list title in column A of sheet 1 was
also being copied and repeated in row A1 of Sheet 2.

Ideally, it would be best if I could specify the range of cells containing
the original list in sheet 1 to be copied and repeated in sheet 2.

Is that possible?

Thanks
Simon

"joel" wrote:

Can you explain better?

If you want
sheet 2 Row 1 to be sheet 1 column A
sheet 2 Row 2 to be sheet 1 column B
sheet 2 Row 3 to be sheet 1 column C

this will work
=INDEX(Sheet1!$A:$A,MOD(COLUMN()-1,COUNTA(Sheet1!$A:$A))+1,Row())

I change the last 1 to Row()

"pieman3" wrote:

Hi Joel

Is there a way to specify a specific column cell range on sheet1 as there is
other text in that column which is also being listed and repeated?

Thanks
Simon

"joel" wrote:

Yes, it only uses the column number on sheet 2.

"pieman3" wrote:

Thanks Joel, will this still work if the row number in sheet2 is different
from the column number in sheet1?

Simon

"joel" wrote:

Put this formula in sheet2 in cell A1. Then copy across Row 1 to column AN

=INDEX(Sheet1!$A:$A,MOD(COLUMN()-1,COUNTA(Sheet1!$A:$A))+1,1)

The formual assumes ther is only the data you want in column A with nothing
after the last character. The formula uses index(Reference Cell, Row,
Column) Where Reference is Sheet1!A1 and the column is always 1. the row
Number isn sheet 1 is the same as the column number in sheet 2. I use the
MOD function so when you get to the end of the data in Sheet 1 it repeats.

"pieman3" wrote:

Hi

Does anyone know how to display content from sequential cells in a column
which is in another sheet in the same workbook and then continue repeat this?

I need the content from these cells to be displayed in a row of cells but
the crucial thing is that I need the cells to repeat the list from the
beginning once a blank cell is reached in the original column. I'll try an
example to make this clearer...

1. There is Sheet A with column A1:A20 containing the names of 20 products.
2. There is Sheet B with row A1:AN1 containing 40 cells

In this example Sheet B should copy all the 20 product names then get to
cell 21 and find a blank cell at 'SheetA!A21' so start the list from the
beginning again. This should occur no matter how many cells are calling the
original list of 20 products but as soon as it finds a blank cell at the end
of the list of 20 products it should go back to the beginning and start
displaying from cell 1. Please note that there should be no limit on the
number of cells in the original product list.

Hopefully I've made it easier to understand and not harder. Any ideas would
be much appreciated.

Thanks
Simon

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grouping a column of data and displaying the number of items grouped [email protected] Excel Worksheet Functions 2 April 16th 08 10:16 PM
Displaying Drop down list items based on selection of another colu myssieh Excel Discussion (Misc queries) 3 February 18th 08 02:15 PM
how do I filter a list of items based on values in another sheet jumpsystems Excel Discussion (Misc queries) 0 June 8th 07 12:10 PM
List items in column Terry Bennett Excel Worksheet Functions 1 July 17th 06 04:16 PM
how can I list items in a column with totals? andy Excel Discussion (Misc queries) 4 February 22nd 05 08:30 PM


All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"