Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 7
Default Formatting a Spreadsheet

I have copied content from a source that has resulted in the following formatting in a spreadsheet:

Title
Description
Blank Line
Title
Description
Blank Line

I need to get the data formatted like this:

Title Description
Title Description

Is there an easy way to get this done?

Thanks in advance for any advice!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Formatting a Spreadsheet

Hi,

Am Tue, 17 Jun 2014 16:23:40 +0100 schrieb TimR1316:

Title
Description
Blank Line
Title
Description
Blank Line


your data in Sheet1. then in Sheet2 A1:
=INDEX(Sheet1!$A:$A,(ROWS($1:1)-1)*3+1)
and in B1:
=INDEX(Sheet1!$A:$A,(ROWS($1:1)-1)*3+2)
Copy both formulas down till you get zeros


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Junior Member
 
Posts: 7
Default

Thanks, Claus! That definitely works. I failed to mention that the title was hyperlinked. Sorry about that oversight. When I copy the title to Sheet2, the hyperlink doesn't copy. Is there a way to modify this so that they hyperlink will copy?

I'll brush up on the index function so I can try to understand exactly what this formula is doing!!

Thanks!



Quote:
Originally Posted by Claus Busch View Post
Hi,

Am Tue, 17 Jun 2014 16:23:40 +0100 schrieb TimR1316:

Title
Description
Blank Line
Title
Description
Blank Line


your data in Sheet1. then in Sheet2 A1:
=INDEX(Sheet1!$A:$A,(ROWS($1:1)-1)*3+1)
and in B1:
=INDEX(Sheet1!$A:$A,(ROWS($1:1)-1)*3+2)
Copy both formulas down till you get zeros


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Formatting a Spreadsheet

hi Tim,

Am Tue, 17 Jun 2014 18:51:27 +0100 schrieb TimR1316:

Thanks, Claus! That definitely works. I failed to mention that the title
was hyperlinked. Sorry about that oversight. When I copy the title to
Sheet2, the hyperlink doesn't copy. Is there a way to modify this so
that they hyperlink will copy?


put the formula into HYPERLINK formula:
=HYPERLINK(INDEX(Sheet1!$A:$A,(ROWS($1:1)-1)*3+1))


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Formatting a Spreadsheet

Hi again,

Am Tue, 17 Jun 2014 18:51:27 +0100 schrieb TimR1316:

Thanks, Claus! That definitely works. I failed to mention that the title
was hyperlinked. Sorry about that oversight. When I copy the title to
Sheet2, the hyperlink doesn't copy. Is there a way to modify this so
that they hyperlink will copy?


or try it with VBA:

Sub Transpose()
Dim LRow As Long
Dim i As Long, j As Long

j = 1
With Sheets("Sheet1")
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To LRow Step 3
.Cells(i, 1).Copy Sheets("Sheet2").Cells(j, 1)
.Cells(i + 1, 1).Copy Sheets("Sheet2").Cells(j, 2)
j = j + 1
Next
End With
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


  #6   Report Post  
Junior Member
 
Posts: 7
Default

Claus - the hyperlink= option didn't work for me. The VBA script works like a charm. I have no idea what it's doing - but it works like a charm. Thanks again!!

Quote:
Originally Posted by Claus Busch View Post
Hi again,

Am Tue, 17 Jun 2014 18:51:27 +0100 schrieb TimR1316:

Thanks, Claus! That definitely works. I failed to mention that the title
was hyperlinked. Sorry about that oversight. When I copy the title to
Sheet2, the hyperlink doesn't copy. Is there a way to modify this so
that they hyperlink will copy?


or try it with VBA:

Sub Transpose()
Dim LRow As Long
Dim i As Long, j As Long

j = 1
With Sheets("Sheet1")
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To LRow Step 3
.Cells(i, 1).Copy Sheets("Sheet2").Cells(j, 1)
.Cells(i + 1, 1).Copy Sheets("Sheet2").Cells(j, 2)
j = j + 1
Next
End With
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Reply
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
formatting a spreadsheet help hj Excel Worksheet Functions 4 May 4th 10 08:04 PM
Formatting a spreadsheet cyb3rwolf Excel Discussion (Misc queries) 3 April 20th 09 01:01 PM
Formatting a Spreadsheet pford Excel Discussion (Misc queries) 2 February 18th 08 10:16 PM
Spreadsheet formatting Philip Drury Excel Discussion (Misc queries) 6 February 20th 07 04:41 PM
Formatting Spreadsheet windsong Excel Discussion (Misc queries) 2 October 19th 05 05:54 PM


All times are GMT +1. The time now is 08:29 AM.

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"