My formula is super long and I know there has to be a way to make it shorter, probably with a VBA loop, but I'm sick of looking at it, and I don't know where to start.
General Setup:
Sheet 1 has 3 cells: Cell B has a VLookUp to Sheet 2, which returns a number. Cell C uses the number to print Cell A as a image file name with Cell B's value minus one to create a image gallery list.
[TABLE="class: grid, width: 800"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]XX-SKU[/TD]
[TD]5[/TD]
[TD]/XX-SKU_1.jpg,/XX-SKU_2.jpg,/XX-SKU_3.jpg,/XX-SKU_4.jpg[/TD]
[/TR]
</tbody>[/TABLE]
The Formula in Cell C is ridiculously long due to the amount of IF's needed to cover at least to 20 cases of numbers.
I'm not all too familiar with all the syntax/referencing for VBA. I am not sure how to generate the list properly either.
The first number (not shown in the table above) has NO underscore, and is not apart of this Cell C. Cell C is blank if there is only a 1 image.
For the following gallery items: there is to be a comma between each, and all start with the forward slash.
Any help is much appreciated
General Setup:
Sheet 1 has 3 cells: Cell B has a VLookUp to Sheet 2, which returns a number. Cell C uses the number to print Cell A as a image file name with Cell B's value minus one to create a image gallery list.
[TABLE="class: grid, width: 800"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]XX-SKU[/TD]
[TD]5[/TD]
[TD]/XX-SKU_1.jpg,/XX-SKU_2.jpg,/XX-SKU_3.jpg,/XX-SKU_4.jpg[/TD]
[/TR]
</tbody>[/TABLE]
The Formula in Cell C is ridiculously long due to the amount of IF's needed to cover at least to 20 cases of numbers.
I'm not all too familiar with all the syntax/referencing for VBA. I am not sure how to generate the list properly either.
The first number (not shown in the table above) has NO underscore, and is not apart of this Cell C. Cell C is blank if there is only a 1 image.
For the following gallery items: there is to be a comma between each, and all start with the forward slash.
Any help is much appreciated