Merge cells based on length VBA EXCEL

I have a statement I am working on for the company I work for, & I am quite new to VBA formatting.
I have a userform that opens when the file is opened, and it has text boxes where you input job code information (date code, year code, job code, and letter code). That information is then pulled from another spreadsheet and inputted into the Invoice/Statement sheet into one cell. The issues I am running into is when the data is put in it is too large to show up in the cell. I need to figure out a VBA code to automatically format it by length of the data in that cell.
I would like for the code to merge down into however many columns it needs!
I attached some screenshots of the file to show the cell, and how I would like it to look afterward.
Again, I am a super newbie to VBA so if you have any pointers; that would be awesome!

Thank you so much!!
Bill GoldenExecutive Managing MemberAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ok can't help you like this you need to post what you did like the workbook that have the code so far and will fix it for you as in this case several possibilities.

Just 1 comment the way you have put the solution is not exactly correct as you can see the text is although ok it has several Balance cells with it it should only be 1. Reason why we need your workbook.

It's not clear to me what constitutes expected text and what constitutes text (?note?) that needs to be merged.
Martin LissOlder than dirtCommented:
Rather than merging cells, would this do? Click the button on the sheet.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Martin LissOlder than dirtCommented:
There's no way in Excel VBA to tell if all the text in a cell is visible, so If my above solution won't work for you and you want to go the merge-cell route then you could use the semi-automatic solution in this workbook. First run the AddText sub and then click the button on the sheet repeatedly until all text is visible.
@Bill Golden
If you are looking for 'Merged Cells' then you will be seriously trapped in what I mentioned before as although you merged say B4-B7 to be 1 cell you still have Col C4 to C7 and D4 to D7 showing individual cells which prevent you to align data. the best way is to use the wraptext function together with a autofit for that row reason why I asked for a workbook to adapt the solution depending on your cells used.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bill GoldenExecutive Managing MemberAuthor Commented:
Thank you @gowflow & @Martin Liss so much!
Both of you definitely contributed to my solution.
@Gowflow, I apologize for not posting a workbook for the question. I was on a tight deadline at that moment and would have had to clear a ton of private information.

Again, thank you so much!
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest youincluding these two new ones.
An Experts Exchange Shortcut for the Truly Lazy (for Apple OS X)
A Guide to Writing Understandable and Maintainable VBA Code
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.