Solved

# Spreading the data in the Excel sheet

Posted on 2011-09-07
202 Views
Hi,

Pls refer attached sample data sheet. I have about 30 Locations(Have shown only 3) and 4 shifts(A1-A4). I want them laid out in the format shown below. I did that by copy pasting the 3 sample locations shown, but  I didnt want to copy paste for all 30 locations and wanted to know if there was an easier way out.

Thanks,

sampledata.xlsx
0
Question by:j1981
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 81

Accepted Solution

byundt earned 250 total points
ID: 36499927
You might try copying across the following formulas for cells B11:B13:
=INDEX(\$A\$4:\$A\$33,1+(COLUMN()-COLUMN(\$B\$11))/4)
=INDEX(\$C\$1:\$F\$1,MOD(COLUMN()-COLUMN(\$B\$12),4)+1)
=INDEX(\$C\$4:\$G\$33,1+(COLUMN()-COLUMN(\$B\$13))/4,MOD(COLUMN()-COLUMN(\$B\$13),4)+1)

These formulas are designed to be used wherever you decide to put the table--just update the cell references.
0

LVL 10

Assisted Solution

SANTABABY earned 250 total points
ID: 36500378
Attached is another solution attempted using VBA.
You can enter any number of locations and any number of shifts under the specified column and generate the matrix in your way.
I've added another sheet with sample data and code.
sampledata.xlsm
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

Finding Certain Criteria 4 36
copy selected cell into new worksheet using checkbox 15 55
what is the 64bit version of this window API? 2 22
LOOK FOR 22 24
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
###### Suggested Courses
Course of the Month8 days, 20 hours left to enroll