Excel Macros

CammedS197

forum member
Joined
Sep 12, 2015
Posts
580
Reaction score
33
Location
Palm Bay, FL
Hey guys,

First off I'm very new to this macro stuff but it is fun, and for what I'm attempting to do I can't really seem to find what I'm looking for in google. Its all just find say Apples and replace all instances of apples with Oranges and done.

I'm trying to build or write a macro in excel using VBA to find for example below a string of words in a row and keep a certain word sets then replace the options after those. Will be doing this for 52 row in one large merged column.

So everything in bold is a constant and will always stay including the vertical line and two periods. All of the X's are variables and change according to what I have on the following sheet that was selected. Say column D2 to D10 has all the different bold constants but in those columns it does not have the (| or the ..). I'm sure that can be added into the macro. then column E2 to E10 will have the variables that can change that are selected for the application.

What would I even search for in google to start this? I'm sure find and replace as well as Vara and strings are related. I just don't know how to specify how to keep what is in bold and replace only that is the x's.

I think it's going to be a longer macro that is specific for each row on the first sheet and I'd have the string Carpet..xxxxx_xxxxxxxx|Cabin..xxx_xxx_xxxx|Floor..xxx|Type..xxx written in the macro calling to say find "Carpet.." Keep Carpet.. and replace after Carpet.. up to |Cabin.. with cell E2 (in theory that should replace the wording between carpet and cabin with whats in cell E2 correct?) and continue on for each row. So id have about 52 of these written in one macro. I believe it is F2 to F52 has all of the little call outs constants and changing variables below. All are different.

Carpet..xxxxx_xxxxxxxx|Cabin..xxx_xxx_xxxx|Floor..xxx|Type..xxx

Side..xxxxxx_xxxx|Rim..xxxxx_xxxxx|Toilet..xxxxx xxxxx|Mirror..xxx|Type..xxx

Thank you, all insight is appreciated

Would like to know if this is even possible lol. Just hard cause I know what I want and need to do but just don't know the wording or coding that the VBA requires.
 

Dad

forum member
Joined
Sep 28, 2016
Posts
654
Reaction score
157
Location
SW KY
You would have better luck asking your question on github or stackoverflow
 

Latest posts

Support us!

Support Us - Become A Supporting Member Today!

Click Here For Details

Sponsor Links

Banner image
Back
Top