Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding data
Using XL 2000
My worksheet contains 20 columns, A:T. The cells in each column (from row 2 down) contain either a "True" or "False" phrase. I need a routine to loop through the 20 columns a row at a time. Row 1 contains random text phrases. Example; Starting in Row 2, where the cell content in the first column (A) equals "True", add the cell content in row 1 (A1) to a variable called CellString. Continue, adding the content in B1, C1, D1 etc to CellString where the above condition is met until the loop completes for that row. When the loop for each row finishes I will transfer the content of CellString to another cell in a different worksheet. The loop repeats for as long as there is data in each row. Any ideas appreciated. Thanks, Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding data
For j = 1 To Cells(1,Columns.Count).End(xlToLeft).Column CellString = "" Fo i = 2 To Cells(Rows.Count,j).End(xlUp).Row If Cells(i,j).Value Then CellString = CellString & Cells(1,j).Value End If Next i 'your code Next j -- HTH RP (remove nothere from the email address if mailing direct) "Paulc" wrote in message ... Using XL 2000 My worksheet contains 20 columns, A:T. The cells in each column (from row 2 down) contain either a "True" or "False" phrase. I need a routine to loop through the 20 columns a row at a time. Row 1 contains random text phrases. Example; Starting in Row 2, where the cell content in the first column (A) equals "True", add the cell content in row 1 (A1) to a variable called CellString. Continue, adding the content in B1, C1, D1 etc to CellString where the above condition is met until the loop completes for that row. When the loop for each row finishes I will transfer the content of CellString to another cell in a different worksheet. The loop repeats for as long as there is data in each row. Any ideas appreciated. Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding Data | Excel Discussion (Misc queries) | |||
Finding data | Excel Discussion (Misc queries) | |||
Finding data | Excel Discussion (Misc queries) | |||
Finding max row containing data... | Excel Discussion (Misc queries) | |||
FINDING LAST ROW OF THE DATA | Excel Programming |