Searching for text in cells
I need to search a group of cells for text and return that text into one
cell. There will always be only one value in that group of cells. |
Sub GetText
Dim rng as Range, sStr as String On Error Resume Next set rng = Selection.SpecialCells(xlConstants,xlTextValues) On Error goto 0 if not rng is nothing then for each cell in rng sStr = sStr & cell.Value next Range("A1").Value = sStr End if End sub -- Regards, Tom Ogilvy "Matt" wrote in message ... I need to search a group of cells for text and return that text into one cell. There will always be only one value in that group of cells. |
All times are GMT +1. The time now is 06:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com