SketchUcation Premium Membership

 

 

concatenating text elements

concatenating text elements

Postby Buckyman » Wed Mar 14, 2012 11:41 pm

SketchUp Version: 8
I am trying to create an Item Code thusly:
="6072"&if(PatioCover!BeamHt<=96,"08",if(PatioCover!BeamHt<=120,"10",if(PatioCover!BeamHt<=144,"12","14")))&PatioCover!PostCol
should result in 607208WH
but what I get is 60728WH
Completely illogical esp. since I have everything in quotes and esp. since the last item in the formula resolves to "WH" which would force any spreadsheet (for example) to identify the result as text.
Buckyman
 
Posts: 22
Joined: Mon Mar 28, 2011 4:04 am

Re: concatenating text elements

Postby DareDevil » Thu Mar 15, 2012 9:41 am

Buckyman wrote:SketchUp Version: 8
I am trying to create an Item Code thusly:
="6072"&if(PatioCover!BeamHt<=96,"08",if(PatioCover!BeamHt<=120,"10",if(PatioCover!BeamHt<=144,"12","14")))&PatioCover!PostCol
should result in 607208WH
but what I get is 60728WH
Completely illogical esp. since I have everything in quotes and esp. since the last item in the formula resolves to "WH" which would force any spreadsheet (for example) to identify the result as text.

I never experienced this problem !... but I never use & ;)
I prefer use CONCATENATE function, and your problem is solved, a "0001" is really "0001" not "1"
So your function will be something like
= CONCATENATE ("6072", if(PatioCover!BeamHt<=96,"08", if(PatioCover!BeamHt<=120,"10", if(PatioCover!BeamHt<=144,"12","14"))), PatioCover!PostCol)
User avatar
DareDevil
 
Posts: 360
Joined: Sun Mar 15, 2009 10:19 pm
Location: Marseille, France
Name: Didier D

Re: concatenating text elements

Postby Buckyman » Thu Mar 15, 2012 6:39 pm

Well that's a bit embarrassing, I guess I should have checked out the available functions.
Thanks for your help!
Buckyman
 
Posts: 22
Joined: Mon Mar 28, 2011 4:04 am

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Artisan Organic Toolset - a set of powerful organic modeling tools.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 1 guest