View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_510_] joel[_510_] is offline
external usenet poster
 
Posts: 1
Default VBA - splitting name and re building in specific order


You need a simple If statement. I'm not sure of you columns so I'm
using X,Y,Z. Change as required. I'm also using Column B to determin
when the data is finised

RowCount = 1
Do while Range("B" & RowCount) < ""
if Range("Z" & Rowcount) = "" then
Range("A" & RowCount) = Range("Z" & RowCount) & _
Range("X" & RowCount) & Range("Y" & RowCount)
else
Range("A" & RowCount) = Range("Y" & RowCount) & _
Range("X" & RowCount)
end if

RowCount = RowCount + 1
loop


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=168752

Microsoft Office Help