![]() |
transposing and parsing cells
Here is my question: I have two cells, side by side on the same row.
One has an amount in it, the other has a list of names, comma delimited. I need to transpose the names so that there is one row per name, with the amount next to it (same amount for each row). How can I start this going? Thanks much. |
transposing and parsing cells
Try this (untested)
sub tspose() dim vAmt, arrNames, rDest as range,x as integer vAmt=activesheet.range("A1").value arrNames=split(activesheet.range("B1").value,",") set rDest=activesheet.range("A3") for x=lbound(arrNames) to ubound(arrNames) rDest.value=vAmt rDest.offset(0,1).value=arrNames(x) set rDest=rDest.offset(1,0) next x end sub Tim. "James" wrote in message oups.com... Here is my question: I have two cells, side by side on the same row. One has an amount in it, the other has a list of names, comma delimited. I need to transpose the names so that there is one row per name, with the amount next to it (same amount for each row). How can I start this going? Thanks much. |
All times are GMT +1. The time now is 12:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com