zendog1960
Active Member
- Joined
- Sep 27, 2003
- Messages
- 459
- Office Version
- 2019
- Platform
- Windows
In the first table below I have a list of clients. Their ID Numbers are in Column A, their names in Column B, Column C holds a picture name, Column D is a formula to create a complete path to the image, Column E has a hyperlink to that image. Columns G & H is a table of each client and their ID numbers for use with vlookups and such. Now after the first table below I will explain what I am wanting to do....
What I want to do is copy the image hyperlinks into the corresponding row for that client. As you can see, Corina has 3 different pictures, Stephanie has 2 and the rest have only 1. This is just a sample from over hundreds of clients. How can I do this via VBA. I am having a difficult time wrapping my head around this.
Any and all help would be greatly appreciated!
Excel 2007 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | 12001 | Corina Stadler | 12001 - 01.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12001 - 01.jpg | 12001 - 01.jpg | 0 | - | |||
2 | 12001 | Corina Stadler | 12001 - 02.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12001 - 02.jpg | 12001 - 02.jpg | 1 | xx - NoPhotoAvailable | |||
3 | 12001 | Corina Stadler | 12001 - 03.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12001 - 03.jpg | 12001 - 03.jpg | 12001 | Corina Stadler | |||
4 | 12002 | Stephanie Taggart | 12002 - 01.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12002 - 01.jpg | 12002 - 01.jpg | 12002 | Stephanie Taggart | |||
5 | 12002 | Stephanie Taggart | 12002 - 02.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12002 - 02.jpg | 12002 - 02.jpg | 12003 | Trae Fowler | |||
6 | 12003 | Trae Fowler | 12003 - 01.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12003 - 01.jpg | 12003 - 01.jpg | 12004 | Heather Perkins | |||
7 | 12004 | Heather Perkins | 12004 - 01.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12004 - 01.jpg | 12004 - 01.jpg | 12005 | Raylene Irwin | |||
8 | 12005 | Raylene Irwin | 12005 - 01.jpg | e:\01 - Bullethead Tattoo\02 - Tattoos\12005 - 01.jpg | 12005 - 01.jpg | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D1 | =IF(C1<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C1,"") | |
D2 | =IF(C2<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C2,"") | |
D3 | =IF(C3<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C3,"") | |
D4 | =IF(C4<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C4,"") | |
D5 | =IF(C5<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C5,"") | |
D6 | =IF(C6<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C6,"") | |
D7 | =IF(C7<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C7,"") | |
D8 | =IF(C8<>"","e:\01 - Bullethead Tattoo\02 - Tattoos\" & C8,"") |
What I want to do is copy the image hyperlinks into the corresponding row for that client. As you can see, Corina has 3 different pictures, Stephanie has 2 and the rest have only 1. This is just a sample from over hundreds of clients. How can I do this via VBA. I am having a difficult time wrapping my head around this.
Any and all help would be greatly appreciated!
Cell Formulas | ||
---|---|---|
Range | Formula | |
G1 | 0 | |
G2 | 1 | |
G3 | 12001 | |
G4 | 12002 | |
G5 | 12003 | |
G6 | 12004 | |
G7 | 12005 | |
H1 | - | |
H2 | xx - NoPhotoAvailable | |
H3 | Corina Stadler | |
H4 | Stephanie Taggart | |
H5 | Trae Fowler | |
H6 | Heather Perkins | |
H7 | Raylene Irwin | |
I3 | 12001 - 01.jpg | |
I4 | 12002 - 01.jpg | |
I5 | 12003 - 01.jpg | |
I6 | 12004 - 01.jpg | |
I7 | 12005 - 01.jpg | |
J3 | 12001 - 02.jpg | |
J4 | 12002 - 02.jpg | |
K3 | 12001 - 03.jpg |