Macro for transferring cell components to Word

mdar007

New Member
Joined
Apr 30, 2019
Messages
3
Objectives:
1. Transfer cell components of column B to F in Excel to a designated place in Word
2. Must retain the format of the destination
3. Repeat the process a number of times equal to the number of rows after row 7 (I think the way to do this is to manually input a value in a separate cell and make it as a base of the macro like, i = 0 to H1 where H1 is the number of rows after row 7)


For example:
I need to transfer cell B8 to Word in Bold format and then cell C8 after that in a regular font upto F8 then repeat that for B9 with Bold format then C9 again etc.


The excel table is arranged as follows:
Column B represents the Diagnosis
Column C represents the Detailed explanation of the diagnosis
Column D represents the recommendation in what to do




I am thinking of using a find and replace macro like:


Find B8 in word then replace with range B8 from excel
Repeat with offset + 1 (e.g. range B 9)
Number of loops = value in H1


'then repeat that with other cell values.

I am sorry, I am not well versed in vba but I have experience in making simple macros as long as I understand the logic behind the code. I really have a problem with loops though.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Ambiguity aside, your description suggests it's something you might be able to use a mailmerge for.
 
Upvote 0
From what your links disclose, that is certainly something a mailmerge can handle.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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