Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
Sub Transposedata() Dim strNotes As String Dim r As Integer, c As Integer Dim intMax As Integer intMax = LastRow(ActiveSheet) For r = 2 To intMax Step 1 For c = 28 To 30 Step 1 strNotes = IIf(c = 28, ActiveSheet.Cells(r, c).Value, strNotes & strRepeat(vbCrLf, 2) & ActiveSheet.Cells(r, c).Value) Next c ActiveSheet.Cells(r, 26).Value = strNotes Next r MsgBox "Done!" End Sub Function LastRow(ws As Worksheet) As Single 'uses worksheet object 'returns last used row On Error Resume Next With ws LastRow = .Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row End With End Function Function strRepeat(str As String, cnt As Integer) As String For i = 1 To cnt str = str & str Next i End Function
|How can I modify this Excel worksheet with a script?||15||50|
|Seeking a modification of Ribbon.button.superTip content - for a customised ribbon button - to remove References to file.Name and to hyperlinks to Application.help||3||17|
|userform submit button saving document, but not imputting data into worksheets||12||26|
|Delete rows if they are duplicates||3||16|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!