[RESOLVED] How to create an Excel Macro for adding text in multiple cells
How do I create a MS Excel Macro that will copy and paste <p> </p> tags in multiple cells within the same column around paragraphs?
Example:
Column B Cell 1:
<p>This is a paragraph that is going to be used in this post as an example. Place the paragraph tags around this.</p>
Column B Cell 2:
<p>This is a paragraph with text used for an example.</p>
And so on.
Paragraphs such as these are in multiple cells within Column B. About 426 cells.
Re: How to create an Excel Macro for adding text in multiple cells
try like
Code:
for each cel in range("b:b")
if isempty(cel) then exit for ' end on empty cel
cel.value = "<p>" & cel & "</p>"
next
Re: How to create an Excel Macro for adding text in multiple cells
Okay. Thank you. I will give it a try. Do you know any good references for creating these type of macros?
Re: [RESOLVED] How to create an Excel Macro for adding text in multiple cells
Thank you. Your code worked today.