Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   check cell one below - if found add to cell above (http://www.programmingforums.org/showthread.php?t=3819)

crmpicco May 9th, 2005 6:32 AM

check cell one below - if found add to cell above
 
I have code that when it finds text in a column it will colour it a certain colour.

Also, when the colour is found the text is put into a variable.

If iCurrentCellCol = iArrayColour Then
'
If the_Heading <> "" Then
rulesXML = rulesXML & "<fare_rule_lines>"
rulesXML = rulesXML & "<heading>" & fix_characters(fix_ampersand(the_Heading)) & "</heading>"
rulesXML = rulesXML & "<content>" & fix_characters(Trim(the_Content)) & "</content>"
rulesXML = rulesXML & "</fare_rule_lines>"
End If

the_Heading = fix_ampersand(Trim(Range(sRange).Text))
the_Content = "&lt;table&gt;"

End If


But my problem is I need to find a way of checking the cell one below the cell that is found, and if it is not blank then add that text to the text that is found.

In other words if Cell A1 had 'The' in it and Cell A2 had 'Matrix' in it I would want cell A1 to contain 'The Matrix'.

Is this possible? If so, how to automate it????

advaTHANKSnce

Picco


All times are GMT -5. The time now is 6:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC