Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have tried this with several samples; but unable to recreate the error you
mentioned. --Just copy the data to Column A --The macro will transpose data in sets in Column B 1 23 4 5 34 4 3 5 6 2 2 3 4 3 2 3 32 'Transposed to 1 23 4 5 34 4 3 5 6 2 2 3 4 3 2 3 32 If this post helps click Yes --------------- Jacob Skaria "peterh" wrote: Jacob, There seems to be a bug in this row Do While Trim(Range("A" & lngRow)) < "" and the compiler stops? Please advise - Thanks Peter "Jacob Skaria" wrote: One way is to use a macro.. You can try out the below macro. If you are new to macros.. --Set the Security level to low/medium in (Tools|Macro|Security). --From workbook launch VBE using short-key Alt+F11. --From menu 'Insert' a module and paste the below code. --Get back to Workbook. --Run macro from Tools|Macro|Run <selected macro() Sub MyMacro() Dim lngRow As Long, lngNRow As Long, lngNCol As Long For lngRow = 1 To Cells(Rows.Count, "A").End(xlUp).Row If Trim(Range("A" & lngRow)) < "" Then lngNRow = lngNRow + 1 lngNCol = 1 Do While Trim(Range("A" & lngRow)) < "" lngNCol = lngNCol + 1 Cells(lngNRow, lngNCol) = Range("A" & lngRow) lngRow = lngRow + 1 Loop End If Next End Sub If this post helps click Yes --------------- Jacob Skaria "peterh" wrote: I have a speadsheet with:- 1 23 4 5 34 4 3 5 6 2 2 3 4 3 2 I need the above info displayed 1 23 4 5 34 4 3 5 6 2 2 3 4 3 2 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lookup to bring back multiple values | Excel Worksheet Functions | |||
Column Matching - Bring the entire row. | Excel Discussion (Misc queries) | |||
formula needed to bring values to another sheet | Excel Worksheet Functions | |||
Bring a code from a cell to a column | Excel Worksheet Functions | |||
Bring back lowercase values | Excel Worksheet Functions |