Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replace pieces of text


I have a spreadsheet where I have an Item Ref number and 3 associated
images.

eg.

Item Ref Image1 Image2 Image3
2800 2800-a.jpg 2800-b.jpg
2800-c.jpg

I now need to add 500 more images, and was wondering if someone knew of
a way for me to add the Ref No. and Image1 Image2 Image3 are filled in
by taking the Ref No and adding -a.jpg , -b.jpg , -c.jpg to it. Hope I
explained what I am trying to achieve.


Item Ref Image1 Image2 Image3
2800 2800-a.jpg 2800-b.jpg
2800-c.jpg
2801 2801-a.jpg 2801-b.jpg
2801-c.jpg
2802 2802-a.jpg 2802-b.jpg 2802-c.jpg


--
Swn-Y-Mor
------------------------------------------------------------------------
Swn-Y-Mor's Profile: http://www.excelforum.com/member.php...o&userid=18359
View this thread: http://www.excelforum.com/showthread...hreadid=517774

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Replace pieces of text

use

=A2&"-a.jpg"
=A2&"-b.jpg"
=A2&"-c.jpg"

and copy down

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Swn-Y-Mor" wrote
in message ...

I have a spreadsheet where I have an Item Ref number and 3 associated
images.

eg.

Item Ref Image1 Image2 Image3
2800 2800-a.jpg 2800-b.jpg
2800-c.jpg

I now need to add 500 more images, and was wondering if someone knew of
a way for me to add the Ref No. and Image1 Image2 Image3 are filled in
by taking the Ref No and adding -a.jpg , -b.jpg , -c.jpg to it. Hope I
explained what I am trying to achieve.


Item Ref Image1 Image2 Image3
2800 2800-a.jpg 2800-b.jpg
2800-c.jpg
2801 2801-a.jpg 2801-b.jpg
2801-c.jpg
2802 2802-a.jpg 2802-b.jpg 2802-c.jpg


--
Swn-Y-Mor
------------------------------------------------------------------------
Swn-Y-Mor's Profile:

http://www.excelforum.com/member.php...o&userid=18359
View this thread: http://www.excelforum.com/showthread...hreadid=517774



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replace pieces of text


Thank You ever so much Bob.
That works a treat and will save me alot of inputting.


--
Swn-Y-Mor
------------------------------------------------------------------------
Swn-Y-Mor's Profile: http://www.excelforum.com/member.php...o&userid=18359
View this thread: http://www.excelforum.com/showthread...hreadid=517774

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Replace pieces of text

Sub AddNames()
Dim rng as Range, cell as Range
set rng = Range(Range("A2"),Range("A2").end(xldown))
for each cell in rng
cell.offset(0,1).Value = cell.Value & "-a.jpg"
cell.offset(0,2).Vaue = cell.Value & "-b.jpg"
cell.offset(0,3).Value = cell.Value & "-c.jpg"
Next
End Sub

--
Regards,
Tom Ogilvy


"Swn-Y-Mor" wrote
in message ...

I have a spreadsheet where I have an Item Ref number and 3 associated
images.

eg.

Item Ref Image1 Image2 Image3
2800 2800-a.jpg 2800-b.jpg
2800-c.jpg

I now need to add 500 more images, and was wondering if someone knew of
a way for me to add the Ref No. and Image1 Image2 Image3 are filled in
by taking the Ref No and adding -a.jpg , -b.jpg , -c.jpg to it. Hope I
explained what I am trying to achieve.


Item Ref Image1 Image2 Image3
2800 2800-a.jpg 2800-b.jpg
2800-c.jpg
2801 2801-a.jpg 2801-b.jpg
2801-c.jpg
2802 2802-a.jpg 2802-b.jpg 2802-c.jpg


--
Swn-Y-Mor
------------------------------------------------------------------------
Swn-Y-Mor's Profile:

http://www.excelforum.com/member.php...o&userid=18359
View this thread: http://www.excelforum.com/showthread...hreadid=517774



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find & replace pieces of a formula? Marty Excel Worksheet Functions 5 September 12th 09 02:12 PM
multiply # of pieces Mike Stewart New Users to Excel 6 March 8th 09 12:04 AM
Can I replace a ' at the beginning of a text cell using Replace Hilde Excel Discussion (Misc queries) 4 September 10th 07 06:22 PM
Hyperlinking two different pieces of text in a single cell Gregj Excel Discussion (Misc queries) 1 August 30th 07 01:36 AM
combining 2 pieces of text from 2 columns alexy Excel Worksheet Functions 3 September 15th 05 10:35 AM


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"