Macro roadblock:If cell contains certain text equalling another cell, then post another cell...

frumpylump

New Member
Joined
Oct 5, 2015
Messages
1
Hi! I've been putting together a spreadsheet for awhile now and have been able to piece it together up until this point, my knowledge and understanding has run dry.
We're running 2007, have a couple macros working already and creating a tool setup sheet for our CNC department and some tool descriptions have tool holder values like H1 and H33 which stands for E.M. Holder and Thru Coolant respectively and we need to transfer this info from H values to descriptions. I haven't posted the codes I've tried because it's big and messy.

Issue 1: the tool descriptions CONTAIN the H values, the cell does not EQUAL the H values.
Issue 2: row C is where this needs to happen, row B has the tool descriptions, and I have listed the H values in row Q and the corresponding H descriptions in row R

so example:

[TABLE="width: 500"]
<tbody>[TR]
[TD](A)Tool#
[/TD]
[TD](B)Tool Description
[/TD]
[TD](C)Tool Holder
[/TD]
[TD]...
[/TD]
[TD](Q)H Values
[/TD]
[TD](R)H Descriptions
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]T52629 INSERT T58810 H33
[/TD]
[TD][/TD]
[TD][/TD]
[TD]H1
[/TD]
[TD]E.M. Holder
[/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]T22537 DEDICATED
[/TD]
[TD]DEDICATED
[/TD]
[TD][/TD]
[TD]...
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20
[/TD]
[TD]T14017 INSERT T57705 H1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]H33
[/TD]
[TD]Thru Coolant
[/TD]
[/TR]
</tbody>[/TABLE]

So now we need Thru Coolant in C2 and E.M. Holder in C4 and I just can't figure it out, tried couple things but can't get whole picture.
B range would be from B12:B100, Q and R range 12:54 each.
Thanks so much in advance! I'm going to keep trying to fix it myself but man my head hurts.

*Bonus Question!*
Sometimes there's two H values, how can I have it see row cell B contains both H3 and H33 for example to post both the H values? If i have to create another H value and description that's fine because there aren't many dual H value combinations.
 

Excel Facts

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

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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