macro for putting data into a cell

Microsoft Office excel 2007 home & stude...
April 27, 2011 at 09:38:37
Specs: Windows XP

I have no knowledge of writing macros and I was wandering if someone could help me write a macro.

This may not even be possible, but I need to see if I can get a macro that will allow me to insert a segment of data into cells that already have data. For example i have a column of data that have different picture names such as AGGL29-30_1.jpg I need a macro that will insert "_thumb" in between the 1 and the .jpg in all of my picture names. All of my picture name end with the 1.jpg. Is this something that can be accomplished with a macro?

Thanks !

See More: macro for putting data into a cell

Report •

April 27, 2011 at 10:48:49
You can also do this with a formula:

If your data looks like this:

            A             B
1) AGGL29-30_1.jpg

Then in B1 enter the formula:


You end up with:

           A                 B
1) AGGL29-30_1.jpg   AGGL29-30_1_Thumb.jpg

Drag the formula down as many rows as necessary,
do a Copy / Past Special / Values
and your done.


Report •

April 27, 2011 at 11:23:58
I am having trouble copying the formula to the rest of the A column, when I try to drag the formula from B it starts highlighting A with a blue outline ,but will not let me copy and paste. When I just copy the formula out of B and try to paste special values into multiple cells in A it just repeats A1 data. What am I doing wrong? Otherwise the formula works exactly how I need it to. Thanks Mike!

Report •

April 27, 2011 at 11:33:39
Disregard that last reply. After foolin' around with it I finally got it to copy the rest of the way down. Thanks so very much you have saved me alot of grief and hours of data entry!

Report •

Related Solutions

Ask Question