Link to home
Start Free TrialLog in
Avatar of tahirih
tahirih

asked on

Access - Combine Cells Across A Row

Hi

Please offer the most efficient manner to add text entries across a row -(e.g 2nd row) m-that are filled with text values.

Example:

A1: The
B1: Dog
C1: Is
D1:Brown

I then have a formula that combines all to say "The Dog Is Brown."

The nuance is that there may be 4 cells across, or 20 - so the combined values may be in Cell Z1.

Hope this made sense.

Thank you.
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

You indicate an "MS Access Database" zone, but it sounds like you are talking about Excel.

Do you want an excel macro for this, or are you doing something in Access to a linked Excel worksheet?
You could try something like this in the cell where their final text will appear:

=TRIM(A1&" "&B1& " " &C1&" "&D1&" "&E1&" "&F1&" "&G1&" ") & "."

This would be in Cell H1 and could be filled down for the other rows.

So for the final text to be in Z1 you would have to load the formula all the way to Y1.
The trim function will trim off the extra spaces, then the Period (".") will be added to the end.

JeffCoachman
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tahirih
tahirih

ASKER

Thank you everyone - please give me a bit to try everything - and I will finsih this question.
Avatar of tahirih

ASKER

Thank you.