Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9628

Splitting data in one row into two

$
0
0

I have a table where I need to split data within a row over two rows (and duplicating some of the columns in both rows).

An example row is:

| Class | Teacher | Day1 | Start1 | End1 | Day 2 | Start2 | End 2|
| 1A001 | Lauren  |   M  | 09:00  | 10:00|   W   | 10:00  | 11:00 |

I need this to be outputted (on a new tab within the same sheet ) as

| Class | Teacher | Day  | Start  | End 1 | 
| 1A001 | Lauren  |   M  | 09:00  | 10:00 |   
| 1A001 | Lauren  |   W  | 10:00  | 11:00 |

This would need to happen automatically (ideal) or when a script is run (as this is not a one-time conversion, with the data source being updated frequently, with the changes needed to be reflected in real-time in the output)

I have managed to achieve this through a Pivot Table in Excel with some script, but I now need to port my whole excel spreadsheet tool to Sheets and I am only just learning about Sheets.


Viewing all articles
Browse latest Browse all 9628

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>