Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 310
Default Help! Text word search.

I am using Excel 2003. I have a spreadsheet with one column and hundreds of
rows of text data (exported from an open ended survey question). I want to
be able to group common responses by searching for key words and then
grouping them together. So if column A has "all data." Column "B" may
contain responses containing the word "budget." Column "C" may contain
responses containing the word "HR."

I tried to use the autofilter (custom) function and then cut and paste into
another column, but that didn't work. I also read just about every question
on this string. I am afraid I am not a proficient Excel user.

HELP! If I can just find a way to highlight a particular search, I can cut
and paste myself Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Help! Text word search.

You want a pivot table. They are easy to learn, and you will never regret
the time you spent finding out about them.

Debra Dalgleish has excellent information on Pivot Tables he
http://www.contextures.com/xlfaqPivot.html

Regards,
Fred.

"Michelle" wrote in message
...
I am using Excel 2003. I have a spreadsheet with one column and hundreds
of
rows of text data (exported from an open ended survey question). I want
to
be able to group common responses by searching for key words and then
grouping them together. So if column A has "all data." Column "B" may
contain responses containing the word "budget." Column "C" may contain
responses containing the word "HR."

I tried to use the autofilter (custom) function and then cut and paste
into
another column, but that didn't work. I also read just about every
question
on this string. I am afraid I am not a proficient Excel user.

HELP! If I can just find a way to highlight a particular search, I can
cut
and paste myself Thanks for your help!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Help! Text word search.

Ther only way to do this is with a macro. the code copies the responses from
sheet1 to sheet2. The macro macro prompts for a string (keyword) and copies
the cells from column A to the new sheet in a column. the macro also keep
ttracks of which responses where moved by putting a counter in column B of
the original worksheet. the macro sorts the orginal worksheet by the number
of times each response gets moved. I assumed some responses may fall into
more than one category.


Sub moveresponses()

Set Sourcesht = Sheets("Sheet1")
Set DestSht = Sheets("Sheet2")


With Sourcesht


Lastrow = .Range("A" & Rows.Count).End(xlUp).Row
If WorksheetFunction.CountA("B2:B" & Lastrow) 0 Then
'insert header row
.Rows(1).Insert
.Range("B2:B" & Lastrow) = 0
.Range("B1") = "Times Moved"
.Range("A1") = "Answer"
Lastrow = Lastrow + 1
End If

Response = InputBox("Enter key word to response :")

'search for key work
Set c = .Columns("A").Find(What:=Response, _
LookIn:=xlValues, LookAt:=xlPart)
If c Is Nothing Then
MsgBox ("Did not find any response" & vbCrLf & _
"Exiting Macro")
Else
If DestSht.Range("A1") = "" Then
NewCol = 1
Else
LastCol = DestSht.Cells(1, Columns.Count).End(xlToLeft).Column
NewCol = LastCol + 1
End If

DestSht.Cells(1, NewCol) = Response
NewRow = 2

firstAddr = c.Address

Do
If c.Row 1 Then
DestSht.Cells(NewRow, NewCol) = c.Value
c.Offset(0, 1) = c.Offset(0, 1) + 1
End If
Set c = .Columns("A").FindNext(after:=c)
x = c.Address
Loop While Not c Is Nothing And c.Address < firstAddr
End If

.Range("A1:B" & Lastrow).Sort _
header:=xlYes, _
key1:=.Range("B1"), _
Order1:=xlAscending

End With



End Sub



"Michelle" wrote:

I am using Excel 2003. I have a spreadsheet with one column and hundreds of
rows of text data (exported from an open ended survey question). I want to
be able to group common responses by searching for key words and then
grouping them together. So if column A has "all data." Column "B" may
contain responses containing the word "budget." Column "C" may contain
responses containing the word "HR."

I tried to use the autofilter (custom) function and then cut and paste into
another column, but that didn't work. I also read just about every question
on this string. I am afraid I am not a proficient Excel user.

HELP! If I can just find a way to highlight a particular search, I can cut
and paste myself Thanks for your help!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
search word or text in excel spreadsheet Louis Excel Discussion (Misc queries) 1 January 18th 08 03:30 PM
Search text field for word GerryK Excel Discussion (Misc queries) 2 September 14th 07 03:42 PM
Search Word guy Excel Worksheet Functions 6 January 7th 06 03:38 PM
1 word search brandi New Users to Excel 3 December 5th 05 09:11 AM
need formula to search column for a word and return another word Skyline Excel Discussion (Misc queries) 5 November 18th 05 10:00 PM


All times are GMT +1. The time now is 10:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"