DataBlake
Well-known Member
- Joined
- Jan 26, 2015
- Messages
- 781
- Office Version
- 2016
- Platform
- Windows
Hello All,
I'm looking for efficiency so a formula or VBA will work for this.
I'm trying to find the best way to create a title that is as close to 80 characters as possible
So the title is broken down like this
Quantity - Color1 - Brand1 - Size1 - Style1 - Pattern1 - Size2 - Brand2 - ImportantText - Manufacturer
so as an example:
5 Black Poof 12x8 Snagl 4x123 44" POP XT Broom & Fork Package Googley Goggle 1900
any information regarding "1" (color, brand, size, etc) is found in sheet "Poof"
any information regarding "2" (color, brand, size, etc) is found in sheet "POP"
Hopefully that paints a good picture as this is usually the amount of info that gets closest to 80 characters
but sometimes it goes over and sometimes i could fit more info.
So here are the general rules that i would like it to follow
For Pattern1 there are two patterns in "Poof" [Columns J & K]
If K is not blank pick the shorter pattern and use that
If the title is too long:
if the title is over 80 characters replace "TitleHelperB2" with "TitleHelperC2"
if the title is still over 80 characters get rid of the "&" in "Broom & Fork Package"
if the title is still over 80 characters get rid of the quantity at the beginning "5 "
if the title is still over 80 characters get rid of Brand2 "POP!B2"
if the title is still over 80 characters display an error message
and if the title is too short:
if the title is less than 65 add Style2 "POP!D2" in between Brand2 and ImportantText ["POP!B2" & " Broom & Fork Package"]
if the title is still less than 70 add the 2nd pattern from "Poof" after Pattern1 [Poof!J2"&" "&Poof!K2] as long as Poof!K2 is not blank
*Note if adding these puts the title over 80 characters then don't add them*
I will try to create a sensitive info version of the workbook
I'm looking for efficiency so a formula or VBA will work for this.
I'm trying to find the best way to create a title that is as close to 80 characters as possible
So the title is broken down like this
Quantity - Color1 - Brand1 - Size1 - Style1 - Pattern1 - Size2 - Brand2 - ImportantText - Manufacturer
so as an example:
5 Black Poof 12x8 Snagl 4x123 44" POP XT Broom & Fork Package Googley Goggle 1900
Code:
="5 "&Poof!D2&" "&[/FONT][/FONT][FONT=arial]Poof!B2&" "&Poof!G2&" "&Poof!C2&" "&Poof!J2&" "&Poof!I2&" "&POP!B2&" "&POP!E2&" Broom & Fork Package "&TitleHelper!B2[/FONT]
any information regarding "1" (color, brand, size, etc) is found in sheet "Poof"
any information regarding "2" (color, brand, size, etc) is found in sheet "POP"
Hopefully that paints a good picture as this is usually the amount of info that gets closest to 80 characters
but sometimes it goes over and sometimes i could fit more info.
So here are the general rules that i would like it to follow
For Pattern1 there are two patterns in "Poof" [Columns J & K]
If K is not blank pick the shorter pattern and use that
If the title is too long:
if the title is over 80 characters replace "TitleHelperB2" with "TitleHelperC2"
if the title is still over 80 characters get rid of the "&" in "Broom & Fork Package"
if the title is still over 80 characters get rid of the quantity at the beginning "5 "
if the title is still over 80 characters get rid of Brand2 "POP!B2"
if the title is still over 80 characters display an error message
and if the title is too short:
if the title is less than 65 add Style2 "POP!D2" in between Brand2 and ImportantText ["POP!B2" & " Broom & Fork Package"]
if the title is still less than 70 add the 2nd pattern from "Poof" after Pattern1 [Poof!J2"&" "&Poof!K2] as long as Poof!K2 is not blank
*Note if adding these puts the title over 80 characters then don't add them*
I will try to create a sensitive info version of the workbook