Find text in one column = add "#, " to different column?

Jennifre

Board Regular
Joined
Jan 11, 2011
Messages
160
Hello Excel experts... I thank you in advance! :)

I need to find words in column U, and if found, add comma-space-assigned number in column R (in same row).
(without disturbing content already in column R. I've begun doing this manually.)

Example of what I'm trying to do: (Would love to have #s added in order, but if can't, that's okay)
worksheet "tags" (partial)
A
B
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]1​

<tbody>
cat1
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]2[/COLOR]​
sat2
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]3[/COLOR]​
on3
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]4[/COLOR]​
mouse4
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]5[/COLOR]​
the5

</tbody>


[/COLOR]
worksheet "join"
Existing #s , #s added via this new trick
(It's okay if the numbers are added to column R at the end of what's there already, esp if I'm able to order
them later?)
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]R[/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]U[/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]1[/COLOR]​
1, 2, 4, 5, 21, more... the cat sat on the mouse ...more
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]2[/COLOR]​
1, 4, 5, 21, 28, more... cat ate the mouse ...more
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]3[/COLOR]​
1, 2, 4, 5, 21, 22, more... the mouse sat under the cat ...more

<tbody>
</tbody>



​Thank you!! :)
 
Hi @Shakehips! :)

Any tips about where I make the substitutions in what you've sent, regarding the col A rows, and col B and C contents? Thank you, Tony!
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
@Jennifur !

I'm not sure that I know what you mean about substitutions.
The code should run on the sample data you posted / I think I replicated.
Bedtime here now. If you / I / both are still confused tomorrow then I will need further clarification of your real data set.
 
Upvote 0
Okay, sleeping @Snakehips, there was a column between "tags" col 1 and col 2. After deleting that and trying again, I get this:

Run-time error '13':

Type mismatch

*I hope this is somehow an easy fix. I am so excited, if this can work! :) Thank you!! :)
 
Upvote 0
Good Morning!
OK, I think my signature just about sums it up. I need clarification of how your data is set up.
The options are...
You provide a specific verbal description
You post representative screenshots
You post a link to a sample file on a third party host such as Dropbox
You PM me and we arrange to exchange a file by email
You resign your current job and get yourself another that does not involve spreadsheets
I 'get a life' and maybe, take up golf instead

Please advise.
 
Upvote 0
@Snakehips, good morning!

I have an alternative, which I can use just the same, it'll just take longer but not terrible. (Better than manually!)

Here is my data, almost literally:
Columns and data (ea column is 100px wide, like almost, below!), in NOW state:
A--------B--------C--------D--------
word

Columns and data, in DESIRED state:
A--------B--------C--------D--------
word x


Is that easy, or possible?

Thank you, Tony!! BOTH your options are perfect! :)
 
Upvote 0
SHOOT! THAT did not work at all!! I'll try again, data is this:

Columns and data (ea column is 100px wide, like almost, below!), in NOW state:
A--------B--------C--------D--------
word

Columns and data, in DESIRED state:
A--------B--------C--------D--------
word--------------x


Is that easy, or possible for some formula / function / magic to:
if a certain "word" is in A1, Excel will add a letter x in C1?
The only thing I'd need is that the x be placed on the same row as the "word", but in column C.

Please let me know, @Snakehips, if you are still with your first coffee and toast! :) Thank you so much!! :)
 
Upvote 0
Here is my data, almost literally:
Columns and data (ea column is 100px wide, like almost, below!), in NOW state:
A--------B--------C--------D--------
word

Columns and data, in DESIRED state:
A--------B--------C--------D--------
word-------------- x


This seems so easy, fingers crossed it actually is!! :)
 
Upvote 0
Hi Jennifre,

Try the following formula in cell C2 (I assume there is a header row):

=if(ISNUMBER(SEARCH("word",A2)), "x", "")

And copy this formula down column C as far as you need it.
 
Upvote 0

Forum statistics

Threads
1,214,574
Messages
6,120,329
Members
448,956
Latest member
Adamsxl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top