View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_90_] mudraker[_90_] is offline
external usenet poster
 
Posts: 1
Default select column cell in same row as loop result?

there are a few diferent ways to code for this - this is just one o
them

For Each C In Selection
Select Case UCase(C)
Case "115297" ': then insert into A "22" and insert into I "23"
range("a" & cell.row).value = "22"
range("i" & cell.row).value = "23"

Case "276534" ' : then insert into A "27" and insert into I "93"
range("a" & cell.row).value = "27"
range("i" & cell.row).value = "93"

Case IsEmpty 'then insert into A "999" and insert into I "999"

case isEmpty
range("a" & cell.row).value = "999"
range("i" & cell.row).value = "999"
exit for
End Select
Next

--
Message posted from http://www.ExcelForum.com