Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
The parawon
 
Posts: n/a
Default A missing reference, maybe?

I'm looking for a better way to get rid of the spaces directly before and
after the values in my cells. When I double click the values, I see the
cursor blinking one space to the right of the data, like this: 'Sales . The
period is where the cursor sits blinking. Without double clicking the cell,
it says: Sales No cursor appears on the unactivated cell (obviously). I
know about the "TRIM" function in order to get rid of before and after
spaces, but I don't want to have to move the data around in order to do a
vlookup. I tried using Find & Replace, but that only helps me find values
that are not formula. I believe I might have a missing reference. Does
anyone know which reference would make Find and Replace work for formulas?
Is there a way to replace the spaces on the outside?

Any push in the right direction would be very appreciated.

  #2   Report Post  
Ken Wright
 
Posts: n/a
Default

Try he-

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"The parawon" wrote in message
...
I'm looking for a better way to get rid of the spaces directly before and
after the values in my cells. When I double click the values, I see the
cursor blinking one space to the right of the data, like this: 'Sales .

The
period is where the cursor sits blinking. Without double clicking the

cell,
it says: Sales No cursor appears on the unactivated cell (obviously).

I
know about the "TRIM" function in order to get rid of before and after
spaces, but I don't want to have to move the data around in order to do a
vlookup. I tried using Find & Replace, but that only helps me find values
that are not formula. I believe I might have a missing reference. Does
anyone know which reference would make Find and Replace work for formulas?
Is there a way to replace the spaces on the outside?

Any push in the right direction would be very appreciated.



  #3   Report Post  
nbrcrunch
 
Posts: n/a
Default


Actually you can use TRIM just as you suggest, without it affecting
formulas that reference the text cells....

1. write the trim formula in another column, referencing the cells
with extraneous spaces.

2. Copy the trim formula cells then paste/special/values-only back on
top of the original text values.


Also,
Yes, you can use Find/Replace to find spaces. Problem is it will
eliminate all spaces, even between words.


--
nbrcrunch
  #4   Report Post  
Ola
 
Posts: n/a
Default

It's not pretty but it works (might be a start...?):

TRIMLEFT: =RIGHT(H4,LEN(H4)-MIN(IF((MID(H4,ROW(INDIRECT("1:"&LEN(H4))),1)<"
"),(ROW(INDIRECT("1:"&LEN(H4)))),""))+1)
TRIMRIGHT: =LEFT(H4,MAX(IF((MID(H4,ROW(INDIRECT("1:"&LEN(H4)) ),1)<"
"),(ROW(INDIRECT("1:"&LEN(H4)))),"")))

TRIMLEFT&RIGHT: Combine the two

Ola Sandstrom


Note:
Since it's an Array formula you have to end the formulas by holding down
Ctrl+Shift and then press Enter.
It will work if " " is Not found both at the beginning and at the end.
My idea was to find the Min position <" " (trimleft) and the
Max...(trimright)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
Cell Reference Math Ralph Howarth Excel Worksheet Functions 0 January 26th 05 06:27 PM
Missing Reference in Excel 2003 Dirk Franke Excel Discussion (Misc queries) 5 January 26th 05 01:24 PM
Incrementing rows (or columns) to a reference in another worksheet Ignobilitor Excel Worksheet Functions 2 January 20th 05 03:45 PM
How do I reference multiple rows Awetronics Excel Worksheet Functions 1 November 4th 04 12:37 AM


All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"