View Single Post
  #1   Report Post  
43fan
 
Posts: n/a
Default Function to format cells???

I have a series of data that gets pulled into a worksheet(it's pulled into a
"data" sheet first from a text file, then creates a "report" from the data
in the worksheet). In most cases, the one set of data will have a product
number and a item number separated by a dash. I have a function that takes
only the portion of the number after the dash, puts a comma after it, then
the next item, comma, etc. This works great for all but one customer, who
doesn't have dashes! Of course, right!? ;) Anyway, what I end up doing is
formatting the cell then to allow wrapping, and then manually adjusting the
width of the cell so it wraps right at the comma.

Is there any way to do this automatically? IOW, when it doesn't find a
dash, set it to wrap text, at the comma(actually, right after the comma)?

Thanks!
Shawn