View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jseven jseven is offline
external usenet poster
 
Posts: 32
Default If Cell equals text Copy Cells, B2,B3,B4

if range("B7").value = "USA" then
'what ever you want it to do here.
else
'what you want it to do if it doesn't equal "USA"
end if

Of course, if you want to do this to several cells in a range, you will
have to loop the code using a loop of some sorts.

For example:

x = 7
Do until range("B" & x).value = ""

if range("B7").value = "USA" then
'what ever you want it to do here.
else
'what you want it to do if it doesn't equal "USA"
end if

loop