View Single Post
  #1   Report Post  
Old April 16th 19, 06:41 PM posted to microsoft.public.excel.programming
[email protected] jmslab@xs4all.nl is offline
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2009
Posts: 55
Default Loop for text check in three colums and set a text code based on thisin another column

Simple loop required for handling a enormous amount of data
If somebody got a free moment,
thx

For a long list with data in column A till Z I want to set a text in column Z based on a part of text in three other columns. The macro should find the text within text in a cell.

In honkiedonkie explanation it is like;

-----------

Loop in column A for all rows from second to last

If (li, co+13) contains text "AAA"
and (li, co+21) contains text "BBB"
and (li, co+22) contains text "CCC"
then set (li,co+25) the text "A"

Else
If (li, co+13) contains text "DDD"
and (li, co+13) does not contains text "EEE"
and (li, co+22) contains text "FFF"
then set (li,co+25) the text "B"

end if

If (li, co+25) is empty
then set (li, co+25) the text "C"
else
end if

next li

-------------

regards, Johan