Hello,
In the attached spreadsheet I would like to create a macro that hides the rows that contain the artists (rows 3,5,8,10...). I tried creating a macro myself, but I have no idea what to do when the song title is in two rows. Thanks!
Hello,
In the attached spreadsheet I would like to create a macro that hides the rows that contain the artists (rows 3,5,8,10...). I tried creating a macro myself, but I have no idea what to do when the song title is in two rows. Thanks!
From an Excel perspective, everything should be in a single row, including artist, and the title should be in a single cell. That's the way Excel is designed to work. Then you could hide the artist column.
Maybe
VBA Noob![]()
Dim LastRow As Long LastRow = Cells(Rows.Count, "C").End(xlUp).Row For i = 2 To LastRow Cells(i, "B").EntireRow.Hidden = _ IIf(UCase(Cells(i, "C")) = Cells(i, "C").Value, True, False) Next i
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Sorry misread
Try
VBA Noob![]()
Dim LastRow As Long LastRow = Cells(Rows.Count, "C").End(xlUp).Row For i = 2 To LastRow Cells(i, "B").EntireRow.Hidden = _ IIf(Cells(i, "C") = _ WorksheetFunction.Proper(Cells(i, "C").Value), True, False) Next i
Thanks for the replies!
shg: This was an imported text file and when I imported it, the Artist was below the Title. I figured out how to copy it to a column (with the help of some people here), so now I want to hide the rows that originally contained the Artist.![]()
VBA Noob: I tried the code you wrote and it did the opposite of what I wanted, so I switched the "True" and "False" around and now it works perfectly!!
Thanks for the replies!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks