PC Review


Reply
Thread Tools Rate Thread

How to add a space after each text value in all the cells in a row

 
 
Peter
Guest
Posts: n/a
 
      3rd Dec 2009
I want to add a space (or any character(s)) after each text value in all the
cells in a row or in a column

For example, cell A2 contains "ABC", cell B2 contains "DEF", and so on. I
want to make all the cells in row 2 to have a space so cell A2 contains "ABC
", cell B2 contains "DEF ",...
 
Reply With Quote
 
 
 
 
Access Noob
Guest
Posts: n/a
 
      3rd Dec 2009
try going to an empty part of the sheet (say row a4) & type =a2&" " or "[any
character]" then copy that across the row for your range. after calc you can
copy the range & paste special (values) back into range a2 ...X2 & your
titles will have a trailing space [any character].

"Peter" wrote:

> I want to add a space (or any character(s)) after each text value in all the
> cells in a row or in a column
>
> For example, cell A2 contains "ABC", cell B2 contains "DEF", and so on. I
> want to make all the cells in row 2 to have a space so cell A2 contains "ABC
> ", cell B2 contains "DEF ",...

 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      3rd Dec 2009
Thanks. Is there a way to copy the formula (=a2&" ") into all the cells or
range of cells in a row instead of copying the formula into one cell at a
time?

"Access Noob" wrote:

> try going to an empty part of the sheet (say row a4) & type =a2&" " or "[any
> character]" then copy that across the row for your range. after calc you can
> copy the range & paste special (values) back into range a2 ...X2 & your
> titles will have a trailing space [any character].
>
> "Peter" wrote:
>
> > I want to add a space (or any character(s)) after each text value in all the
> > cells in a row or in a column
> >
> > For example, cell A2 contains "ABC", cell B2 contains "DEF", and so on. I
> > want to make all the cells in row 2 to have a space so cell A2 contains "ABC
> > ", cell B2 contains "DEF ",...

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      3rd Dec 2009
Select the range say A3:J3. A3 being the active cell; keeping the selection
press F2 and edit/enter formula in A3. Keeping the selection Hit Ctrl+ Enter
instead of Enter..The formula will be applied to all cells in the selection.

--
Jacob


"Peter" wrote:

> Thanks. Is there a way to copy the formula (=a2&" ") into all the cells or
> range of cells in a row instead of copying the formula into one cell at a
> time?
>
> "Access Noob" wrote:
>
> > try going to an empty part of the sheet (say row a4) & type =a2&" " or "[any
> > character]" then copy that across the row for your range. after calc you can
> > copy the range & paste special (values) back into range a2 ...X2 & your
> > titles will have a trailing space [any character].
> >
> > "Peter" wrote:
> >
> > > I want to add a space (or any character(s)) after each text value in all the
> > > cells in a row or in a column
> > >
> > > For example, cell A2 contains "ABC", cell B2 contains "DEF", and so on. I
> > > want to make all the cells in row 2 to have a space so cell A2 contains "ABC
> > > ", cell B2 contains "DEF ",...

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      3rd Dec 2009
You have suggestions on how to accomplish this, but this kind of thing is
usually bad.

If you have formulas like:

=if(a2="abc","something","something else")

Then they won't return what you expect. You'll either have to modify all(!) the
formulas to look like:

=if(trim(a2)="abc",...)

Or fix the data again.

(And looking at the value in the formula bar isn't enough to notice that extra
space character.)

If you're doing this to match another table (imported from a different
application???), then you could change the formulas to include the space
character:

=vlookup(a2&" ",sheet99!a:b,2,false)

Even then, this is a clumsy fix (I think). Instead I'd clean up that original
data so that it didn't have those extra trailing spaces.

If you needed something like that, you could ask and you'll get tons of
responses.

Peter wrote:
>
> I want to add a space (or any character(s)) after each text value in all the
> cells in a row or in a column
>
> For example, cell A2 contains "ABC", cell B2 contains "DEF", and so on. I
> want to make all the cells in row 2 to have a space so cell A2 contains "ABC
> ", cell B2 contains "DEF ",...


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine text from 3 cells into 1 cell with space and ", bet JOF Microsoft Excel New Users 1 11th Feb 2009 02:32 PM
Remove blank space in front of text in multiple cells at once SMS Microsoft Excel Misc 2 13th Jan 2009 08:04 AM
Separate Text from a cell by space into other cells Sajjad Microsoft Excel Worksheet Functions 5 15th Oct 2008 12:24 PM
Re: single space text/double space between Suzanne S. Barnhill Microsoft Word New Users 6 7th Feb 2006 09:10 PM
concatenate text cells- add space Vivian Microsoft Excel Misc 5 6th Sep 2003 09:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 AM.