View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Enter value in compute cell location?

A bit easier to work with than my 1st version because it uses column labels...

Sub DisperseValues2()
Dim sCol$, LastRow&, n&

LastRow = Cells(Rows.Count, "B").End(xlUp).Row

For n = 2 To LastRow
Select Case UCase$(Cells(n, "B"))
Case "A": sCol = "D"
Case "B": sCol = "E"
Case "C": sCol = "F"
'...
End Select
Cells(n, sCol) = Cells(n, "A")
Next 'n
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion