Infoconstructionrecruit
New Member
- Joined
- May 16, 2022
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
Dear Mr Excel
I would be so grateful for some help with this.
I have 4 Sheets that contain data that i am trying to write a code for.
MessagesSheet (Which is named "replies" followed by "date" and "time"): This contains text messages received. The data is organised as follows: Each row contains the Contact number and the messages for that number are displayed on the same row in each column for the number of messages received.
I then have three separate sheets which contain key words I would like to identify within the MessagesSheet. Some of the key words are part of a sentence, therefore forming 3 or 4 words together.:
PositiveResponsesSheet
NegativeResponsesSheet
MaybeResponsesSheet.
I need the code to systematically use a For Each Statement to perform the following task:
Look at each cell within the MessagesSheet and check each of the cells within the Key Words Sheets if they keys words appear in the MessagesSheet. If the result is positive, populate a cell in column 3 with text indicating one of the following Strings:
P (Positive)
N (Negative)
M Maybe)
Some of the Key words in the above sheets have key words in separate columns, i am looking for these key words to be searched with a wild card in between the two key words.
Then if a key word has been identified for more than one of the key word sheets, then return to column 3 a M.
Then the rest i should be ok with, however i would be open to suggestions for how i add a few other conditionals within those loops, such as:
If the message is a message i have sent, skip (Messages i sent would be in another sheet within the same workbook)
If the messages received have been messages received already (Each time messages are received another sheet is added, showing the new messages, but it includes all the old messages.
Sample of sheet is available on this link. https://wetransfer.com/downloads/0ac64cdccd316eb0395d7da2f0a66eb920220621204813/04997f1bb42369ed9da916b28f01b66520220621204836/a61330
I would be so grateful for some help with this.
I have 4 Sheets that contain data that i am trying to write a code for.
MessagesSheet (Which is named "replies" followed by "date" and "time"): This contains text messages received. The data is organised as follows: Each row contains the Contact number and the messages for that number are displayed on the same row in each column for the number of messages received.
I then have three separate sheets which contain key words I would like to identify within the MessagesSheet. Some of the key words are part of a sentence, therefore forming 3 or 4 words together.:
PositiveResponsesSheet
NegativeResponsesSheet
MaybeResponsesSheet.
I need the code to systematically use a For Each Statement to perform the following task:
Look at each cell within the MessagesSheet and check each of the cells within the Key Words Sheets if they keys words appear in the MessagesSheet. If the result is positive, populate a cell in column 3 with text indicating one of the following Strings:
P (Positive)
N (Negative)
M Maybe)
Some of the Key words in the above sheets have key words in separate columns, i am looking for these key words to be searched with a wild card in between the two key words.
Then if a key word has been identified for more than one of the key word sheets, then return to column 3 a M.
Then the rest i should be ok with, however i would be open to suggestions for how i add a few other conditionals within those loops, such as:
If the message is a message i have sent, skip (Messages i sent would be in another sheet within the same workbook)
If the messages received have been messages received already (Each time messages are received another sheet is added, showing the new messages, but it includes all the old messages.
Sample of sheet is available on this link. https://wetransfer.com/downloads/0ac64cdccd316eb0395d7da2f0a66eb920220621204813/04997f1bb42369ed9da916b28f01b66520220621204836/a61330