Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
karyoker
 
Posts: n/a
Default More formatting


I print karaoke books with the artist in column 1 and the song titles in
column2.. Is there a way to move each artists song titles below the
artists name in column 1?

col1 col2 To This Col1
Artist Song1 Artist
Song2 Song1
Song3 Song2
Song3


--
karyoker
------------------------------------------------------------------------
karyoker's Profile: http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281

  #2   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default More formatting

Sub Test()
Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count, "B").End(xlUp).Row
For i = iLastRow To 1 Step -1
If Cells(i, "A").Value < "" Then
Rows(i + 1).Insert
Cells(i + 1, "A").Value = Cells(i, "B").Value
Else
Cells(i, "A").Value = Cells(i, "B").Value
End If
Cells(i, "B").Value = ""
Next i
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"karyoker" wrote in
message ...

I print karaoke books with the artist in column 1 and the song titles in
column2.. Is there a way to move each artists song titles below the
artists name in column 1?

col1 col2 To This Col1
Artist Song1 Artist
Song2 Song1
Song3 Song2
Song3


--
karyoker
------------------------------------------------------------------------
karyoker's Profile:

http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281



  #3   Report Post  
Posted to microsoft.public.excel.newusers
karyoker
 
Posts: n/a
Default More formatting


Ok Thanks thats almost there....

Instead of this:

*10Years*
Wasteland
3 DOORS DOWN
Behind Those Eyes
3 DOORS DOWN
Live For Today

I need this:

*10Years*
Wasteland
3 DOORS DOWN
Behind Those Eyes
Live For Today


--
karyoker
------------------------------------------------------------------------
karyoker's Profile: http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281

  #4   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default More formatting

R u saying the code is creating duplicates, or u weant it tro recognise
duplicates and remove them?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"karyoker" wrote in
message ...

Ok Thanks thats almost there....

Instead of this:

*10Years*
Wasteland
3 DOORS DOWN
Behind Those Eyes
3 DOORS DOWN
Live For Today

I need this:

*10Years*
Wasteland
3 DOORS DOWN
Behind Those Eyes
Live For Today


--
karyoker
------------------------------------------------------------------------
karyoker's Profile:

http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281



  #5   Report Post  
Posted to microsoft.public.excel.newusers
karyoker
 
Posts: n/a
Default More formatting


Yes trying to remove duplicates... In the example above 3 Doors Down
has 2 songs and would like the dup artist listing removed... I thought
I could format col1 with *BOLD* but when the songs are moved to col1
they are formatted bold too....Actually I would just like the artists
to be underlined...


Thanks....


--
karyoker
------------------------------------------------------------------------
karyoker's Profile: http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281



  #6   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default More formatting

How about this

Sub Test()

Dim iLastRow As Long
Dim i As Long
Dim iStart As Long
Dim rng As Range

iLastRow = Cells(Rows.Count, "B").End(xlUp).Row
iStart = iLastRow
For i = iLastRow To 1 Step -1
If Cells(i, "A").Value < "" Then
Rows(i + 1).Insert
Cells(i + 1, "A").Value = Cells(i, "B").Value
iStart = i - 1
Cells(i, "A").Font.Underline = True
Else
Cells(i, "A").Value = Cells(i, "B").Value
If Application.CountIf(Range("A" & i & ":A" & iStart), Cells(i,
"A").Value) 1 Then
If rng Is Nothing Then
Set rng = Rows(i)
Else
Set rng = Union(rng, Rows(i))
End If
End If
End If
Cells(i, "B").Value = ""
Next i
If Not rng Is Nothing Then rng.Delete
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"karyoker" wrote in
message ...

Yes trying to remove duplicates... In the example above 3 Doors Down
has 2 songs and would like the dup artist listing removed... I thought
I could format col1 with *BOLD* but when the songs are moved to col1
they are formatted bold too....Actually I would just like the artists
to be underlined...


Thanks....


--
karyoker
------------------------------------------------------------------------
karyoker's Profile:

http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281



  #7   Report Post  
Posted to microsoft.public.excel.newusers
karyoker
 
Posts: n/a
Default More formatting


Bob it is So So close!!! It still lists the artists in duplicate...Where
the artist is listed for multiple songs can we delete those rows?

Thanks....


--
karyoker
------------------------------------------------------------------------
karyoker's Profile: http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281

  #8   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default More formatting

Can you give me an example of the data that I can work on?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"karyoker" wrote in
message ...

Bob it is So So close!!! It still lists the artists in duplicate...Where
the artist is listed for multiple songs can we delete those rows?

Thanks....


--
karyoker
------------------------------------------------------------------------
karyoker's Profile:

http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281



  #9   Report Post  
Posted to microsoft.public.excel.newusers
karyoker
 
Posts: n/a
Default More formatting


This is a short list.. Col1 and col2 are the only ones used....


+-------------------------------------------------------------------+
|Filename: Book2.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4265 |
+-------------------------------------------------------------------+

--
karyoker
------------------------------------------------------------------------
karyoker's Profile: http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281

  #10   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default More formatting

Sub Test()

Dim iLastRow As Long
Dim i As Long
Dim iStart As Long
Dim rng As Range

iLastRow = Cells(Rows.Count, "B").End(xlUp).Row
iStart = iLastRow
For i = iLastRow To 2 Step -1
If Cells(i, "A").Value < Cells(i - 1, "A").Value Then
Rows(i + 1).Insert
Cells(i + 1, "A").Value = Cells(i, "B").Value
iStart = i - 1
Cells(i, "A").Font.Underline = True
Else
Cells(i, "A").Value = Cells(i, "B").Value
End If
Cells(i, "B").Value = ""
Next i
End Sub


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"karyoker" wrote in
message ...

This is a short list.. Col1 and col2 are the only ones used....


+-------------------------------------------------------------------+
|Filename: Book2.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4265 |
+-------------------------------------------------------------------+

--
karyoker
------------------------------------------------------------------------
karyoker's Profile:

http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281





  #11   Report Post  
Posted to microsoft.public.excel.newusers
karyoker
 
Posts: n/a
Default More formatting


Bob you are a Gentleman and a Scholar and I owe you one:)

Thanks a bunch!!!!!


--
karyoker
------------------------------------------------------------------------
karyoker's Profile: http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281

  #12   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default More formatting

Glad we got there.

Enjoy the music ... but Jim Reeves?

Bob

"karyoker" wrote in
message ...

Bob you are a Gentleman and a Scholar and I owe you one:)

Thanks a bunch!!!!!


--
karyoker
------------------------------------------------------------------------
karyoker's Profile:

http://www.excelforum.com/member.php...o&userid=29417
View this thread: http://www.excelforum.com/showthread...hreadid=504281



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
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 10:39 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 05:39 AM.

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

About Us

"It's about Microsoft Excel"