Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
I have a very large amount of data (workday time punch data) that I need to alter from multiple rows to multiple columns on one row. See small example of data as follows where FirstName, LastName, Badge, Store, ScanDttm, RAW, CONVERTED are column headings (A1 thru G1): FirstName LastName Badge Store ScanDttm RAW CONVERTED ROBERT H. CASAVAN 600265 1211 1/2/2004 28:00.0 9:28:00 AM ROBERT H. CASAVAN 600265 1211 1/2/2004 57:00.0 2:57:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 24:00.0 3:24:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 03:00.0 5:03:00 PM BRIAN BAUM 600760 1211 1/2/2004 36:00.0 9:36:00 AM BRIAN BAUM 600760 1211 1/2/2004 05:00.0 3:05:00 PM MICHAEL ANTOSIK 600820 1439 1/2/2004 52:00.0 9:52:00 AM MICHAEL ANTOSIK 600820 1439 1/2/2004 06:00.0 1:06:00 PM I want to take the CONVERTED data (time punch in & out time) for ROBERT H. CASAVAN on 1/2/04 (ScanDttm) and spread those 4 in & out time entries into 1 row and multiple columns. Then the same for BRIAN BAUM, and the same for MICHAEL ANTOSIK, etc. Each individual will have from 1 to 4 in & out entries on a given day. Is there a way to accomplish this without copying and transposing each set of in & out time entries for each person and each day separately? If so, how do I do that? Thank you! -- heyredone |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
You can transpose data using either the =TRANSPOSE(A1:A4) function or using the copy Paste Special Transpose command. You may want to write a macro to do one or the other of these. But first test to see which works for you, then record a macro to convert one row of data and post it as a new question and ask for help generalizing it to n rows of data. For the Transpose function you highlight four cells, type the formula and press Shift Ctrl Enter, to enter it -- Thanks, Shane Devenshire "heyredone" wrote: Hello, I have a very large amount of data (workday time punch data) that I need to alter from multiple rows to multiple columns on one row. See small example of data as follows where FirstName, LastName, Badge, Store, ScanDttm, RAW, CONVERTED are column headings (A1 thru G1): FirstName LastName Badge Store ScanDttm RAW CONVERTED ROBERT H. CASAVAN 600265 1211 1/2/2004 28:00.0 9:28:00 AM ROBERT H. CASAVAN 600265 1211 1/2/2004 57:00.0 2:57:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 24:00.0 3:24:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 03:00.0 5:03:00 PM BRIAN BAUM 600760 1211 1/2/2004 36:00.0 9:36:00 AM BRIAN BAUM 600760 1211 1/2/2004 05:00.0 3:05:00 PM MICHAEL ANTOSIK 600820 1439 1/2/2004 52:00.0 9:52:00 AM MICHAEL ANTOSIK 600820 1439 1/2/2004 06:00.0 1:06:00 PM I want to take the CONVERTED data (time punch in & out time) for ROBERT H. CASAVAN on 1/2/04 (ScanDttm) and spread those 4 in & out time entries into 1 row and multiple columns. Then the same for BRIAN BAUM, and the same for MICHAEL ANTOSIK, etc. Each individual will have from 1 to 4 in & out entries on a given day. Is there a way to accomplish this without copying and transposing each set of in & out time entries for each person and each day separately? If so, how do I do that? Thank you! -- heyredone |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Shane,
Thank you for your response. As you can see from the e-mail string, I did use Glenn's array suggestion and it worked wonderfully. Thanks again for responding. -- heyredone "ShaneDevenshire" wrote: Hi, You can transpose data using either the =TRANSPOSE(A1:A4) function or using the copy Paste Special Transpose command. You may want to write a macro to do one or the other of these. But first test to see which works for you, then record a macro to convert one row of data and post it as a new question and ask for help generalizing it to n rows of data. For the Transpose function you highlight four cells, type the formula and press Shift Ctrl Enter, to enter it -- Thanks, Shane Devenshire "heyredone" wrote: Hello, I have a very large amount of data (workday time punch data) that I need to alter from multiple rows to multiple columns on one row. See small example of data as follows where FirstName, LastName, Badge, Store, ScanDttm, RAW, CONVERTED are column headings (A1 thru G1): FirstName LastName Badge Store ScanDttm RAW CONVERTED ROBERT H. CASAVAN 600265 1211 1/2/2004 28:00.0 9:28:00 AM ROBERT H. CASAVAN 600265 1211 1/2/2004 57:00.0 2:57:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 24:00.0 3:24:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 03:00.0 5:03:00 PM BRIAN BAUM 600760 1211 1/2/2004 36:00.0 9:36:00 AM BRIAN BAUM 600760 1211 1/2/2004 05:00.0 3:05:00 PM MICHAEL ANTOSIK 600820 1439 1/2/2004 52:00.0 9:52:00 AM MICHAEL ANTOSIK 600820 1439 1/2/2004 06:00.0 1:06:00 PM I want to take the CONVERTED data (time punch in & out time) for ROBERT H. CASAVAN on 1/2/04 (ScanDttm) and spread those 4 in & out time entries into 1 row and multiple columns. Then the same for BRIAN BAUM, and the same for MICHAEL ANTOSIK, etc. Each individual will have from 1 to 4 in & out entries on a given day. Is there a way to accomplish this without copying and transposing each set of in & out time entries for each person and each day separately? If so, how do I do that? Thank you! -- heyredone |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
heyredone wrote:
Hello, I have a very large amount of data (workday time punch data) that I need to alter from multiple rows to multiple columns on one row. See small example of data as follows where FirstName, LastName, Badge, Store, ScanDttm, RAW, CONVERTED are column headings (A1 thru G1): FirstName LastName Badge Store ScanDttm RAW CONVERTED ROBERT H. CASAVAN 600265 1211 1/2/2004 28:00.0 9:28:00 AM ROBERT H. CASAVAN 600265 1211 1/2/2004 57:00.0 2:57:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 24:00.0 3:24:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 03:00.0 5:03:00 PM BRIAN BAUM 600760 1211 1/2/2004 36:00.0 9:36:00 AM BRIAN BAUM 600760 1211 1/2/2004 05:00.0 3:05:00 PM MICHAEL ANTOSIK 600820 1439 1/2/2004 52:00.0 9:52:00 AM MICHAEL ANTOSIK 600820 1439 1/2/2004 06:00.0 1:06:00 PM I want to take the CONVERTED data (time punch in & out time) for ROBERT H. CASAVAN on 1/2/04 (ScanDttm) and spread those 4 in & out time entries into 1 row and multiple columns. Then the same for BRIAN BAUM, and the same for MICHAEL ANTOSIK, etc. Each individual will have from 1 to 4 in & out entries on a given day. Is there a way to accomplish this without copying and transposing each set of in & out time entries for each person and each day separately? If so, how do I do that? Thank you! Array enter (CTRL+SHIFT+ENTER) the following in H2 (adjusting the 9999 to the correct number of rows in your data): =IF(AND(COUNTIF($C$2:$C2,$C2)=1,COUNTIF($C$2:$C$99 99,$C2)COLUMN()-8), LARGE(TRANSPOSE(($C$2:$C$9999=$C2)*$G$2:$G$9999),8 +COUNTIF($C$2:$C$9999,$C2)-COLUMN()),"") Copy across to K2 and down as needed. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Glenn wrote:
heyredone wrote: Hello, I have a very large amount of data (workday time punch data) that I need to alter from multiple rows to multiple columns on one row. See small example of data as follows where FirstName, LastName, Badge, Store, ScanDttm, RAW, CONVERTED are column headings (A1 thru G1): FirstName LastName Badge Store ScanDttm RAW CONVERTED ROBERT H. CASAVAN 600265 1211 1/2/2004 28:00.0 9:28:00 AM ROBERT H. CASAVAN 600265 1211 1/2/2004 57:00.0 2:57:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 24:00.0 3:24:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 03:00.0 5:03:00 PM BRIAN BAUM 600760 1211 1/2/2004 36:00.0 9:36:00 AM BRIAN BAUM 600760 1211 1/2/2004 05:00.0 3:05:00 PM MICHAEL ANTOSIK 600820 1439 1/2/2004 52:00.0 9:52:00 AM MICHAEL ANTOSIK 600820 1439 1/2/2004 06:00.0 1:06:00 PM I want to take the CONVERTED data (time punch in & out time) for ROBERT H. CASAVAN on 1/2/04 (ScanDttm) and spread those 4 in & out time entries into 1 row and multiple columns. Then the same for BRIAN BAUM, and the same for MICHAEL ANTOSIK, etc. Each individual will have from 1 to 4 in & out entries on a given day. Is there a way to accomplish this without copying and transposing each set of in & out time entries for each person and each day separately? If so, how do I do that? Thank you! Array enter (CTRL+SHIFT+ENTER) the following in H2 (adjusting the 9999 to the correct number of rows in your data): =IF(AND(COUNTIF($C$2:$C2,$C2)=1,COUNTIF($C$2:$C$99 99,$C2)COLUMN()-8), LARGE(TRANSPOSE(($C$2:$C$9999=$C2)*$G$2:$G$9999),8 +COUNTIF($C$2:$C$9999,$C2)-COLUMN()),"") Copy across to K2 and down as needed. Looks like the TRANSPOSE wasn't needed: =IF(AND(COUNTIF($C$2:$C2,$C2)=1,COUNTIF($C$2:$C$99 9,$C2)COLUMN()-8), LARGE(($C$2:$C$999=$C2)*$G$2:$G$999,8+COUNTIF($C$2 :$C$999,$C2)-COLUMN()),"") |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Glenn,
Thank you for your quick response. Okay, I tried the array string you provided. I get $NUM in K2. What did I do wrong? Also, why am I entering $C$2 or $C2 ... is that the cell C2? My little chart of data may not have looked exactly right -- the in & out time punches are located starting in G2 and downward. Just trying to understand. Thanks so much! -- heyredone "Glenn" wrote: Glenn wrote: heyredone wrote: Hello, I have a very large amount of data (workday time punch data) that I need to alter from multiple rows to multiple columns on one row. See small example of data as follows where FirstName, LastName, Badge, Store, ScanDttm, RAW, CONVERTED are column headings (A1 thru G1): FirstName LastName Badge Store ScanDttm RAW CONVERTED ROBERT H. CASAVAN 600265 1211 1/2/2004 28:00.0 9:28:00 AM ROBERT H. CASAVAN 600265 1211 1/2/2004 57:00.0 2:57:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 24:00.0 3:24:00 PM ROBERT H. CASAVAN 600265 1211 1/2/2004 03:00.0 5:03:00 PM BRIAN BAUM 600760 1211 1/2/2004 36:00.0 9:36:00 AM BRIAN BAUM 600760 1211 1/2/2004 05:00.0 3:05:00 PM MICHAEL ANTOSIK 600820 1439 1/2/2004 52:00.0 9:52:00 AM MICHAEL ANTOSIK 600820 1439 1/2/2004 06:00.0 1:06:00 PM I want to take the CONVERTED data (time punch in & out time) for ROBERT H. CASAVAN on 1/2/04 (ScanDttm) and spread those 4 in & out time entries into 1 row and multiple columns. Then the same for BRIAN BAUM, and the same for MICHAEL ANTOSIK, etc. Each individual will have from 1 to 4 in & out entries on a given day. Is there a way to accomplish this without copying and transposing each set of in & out time entries for each person and each day separately? If so, how do I do that? Thank you! Array enter (CTRL+SHIFT+ENTER) the following in H2 (adjusting the 9999 to the correct number of rows in your data): =IF(AND(COUNTIF($C$2:$C2,$C2)=1,COUNTIF($C$2:$C$99 99,$C2)COLUMN()-8), LARGE(TRANSPOSE(($C$2:$C$9999=$C2)*$G$2:$G$9999),8 +COUNTIF($C$2:$C$9999,$C2)-COLUMN()),"") Copy across to K2 and down as needed. Looks like the TRANSPOSE wasn't needed: =IF(AND(COUNTIF($C$2:$C2,$C2)=1,COUNTIF($C$2:$C$99 9,$C2)COLUMN()-8), LARGE(($C$2:$C$999=$C2)*$G$2:$G$999,8+COUNTIF($C$2 :$C$999,$C2)-COLUMN()),"") |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
heyredone wrote:
Glenn, Thank you for your quick response. Okay, I tried the array string you provided. I get $NUM in K2. What did I do wrong? Also, why am I entering $C$2 or $C2 ... is that the cell C2? My little chart of data may not have looked exactly right -- the in & out time punches are located starting in G2 and downward. Just trying to understand. Thanks so much! Not sure why you would get $NUM. The formula will expand to the right as far as you want. If there is text in the CONVERTED column you get #VALUE!. If you use exactly the data in your original post, what results do you get in H2:K2? Yes, I am referencing column C in the formula. I assumed that the Badge number would be unique for each employee. If that's not right, let me know. Also, I forgot to include the date, assuming the same badge number will be in your data for more than one date. Correction as follows (array-entered): =IF(AND(SUMPRODUCT(($C$2:$C2=$C2)*($E$2:$E2=$E2))= 1, SUMPRODUCT(($C$2:$C999=$C2)*($E$2:$E999=$E2))COLU MN()-8), LARGE(($C$2:$C$999=$C2)*($E$2:$E$999=$E2)*$G$2:$G$ 999, 8+SUMPRODUCT(($C$2:$C999=$C2)*($E$2:$E999=$E2))-COLUMN()),"") I have data starting in row 2 with column headings in row 1 as follows: A - FirstName B - LastName C - Badge D - Store E - ScanDttm F - RAW G - CONVERTED Columns H, I, J and K should be the new columns for your punch times. If that's not right, let me know and I'll adjust the formula. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Glenn,
Sorry for the delay in responding. Just as I was attempting to get back to work in the spreadsheet yesterday to include the new array you provided, I encountered technical difficulties and have not been able to get back into the document safely. As soon as the issue is resolved, I will try it and let you know how it turns out. Thanks! -- heyredone "Glenn" wrote: heyredone wrote: Glenn, Thank you for your quick response. Okay, I tried the array string you provided. I get $NUM in K2. What did I do wrong? Also, why am I entering $C$2 or $C2 ... is that the cell C2? My little chart of data may not have looked exactly right -- the in & out time punches are located starting in G2 and downward. Just trying to understand. Thanks so much! Not sure why you would get $NUM. The formula will expand to the right as far as you want. If there is text in the CONVERTED column you get #VALUE!. If you use exactly the data in your original post, what results do you get in H2:K2? Yes, I am referencing column C in the formula. I assumed that the Badge number would be unique for each employee. If that's not right, let me know. Also, I forgot to include the date, assuming the same badge number will be in your data for more than one date. Correction as follows (array-entered): =IF(AND(SUMPRODUCT(($C$2:$C2=$C2)*($E$2:$E2=$E2))= 1, SUMPRODUCT(($C$2:$C999=$C2)*($E$2:$E999=$E2))COLU MN()-8), LARGE(($C$2:$C$999=$C2)*($E$2:$E$999=$E2)*$G$2:$G$ 999, 8+SUMPRODUCT(($C$2:$C999=$C2)*($E$2:$E999=$E2))-COLUMN()),"") I have data starting in row 2 with column headings in row 1 as follows: A - FirstName B - LastName C - Badge D - Store E - ScanDttm F - RAW G - CONVERTED Columns H, I, J and K should be the new columns for your punch times. If that's not right, let me know and I'll adjust the formula. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Transposing multiple columns to rows | Excel Worksheet Functions | |||
Transposing One Column to Multiple Rows | Excel Worksheet Functions | |||
Transposing Multiple Cell References to Multiple Values (NOT total | Excel Discussion (Misc queries) | |||
Transposing Multiple Cell references as Multiple Values | Excel Discussion (Misc queries) | |||
transposing data from 1 column into multiple rows | Excel Discussion (Misc queries) |