Find and Replace where there are line breaks

G

Guest

I'm having trouble with F & R not finding.

I have a cell that says, for example "Thing 1", line break (Alt-enter), then
"Thing 2". Thing 2 is blue, 1 is auto, but i don't think that matters here.

I'd ideally like to, for all cells, be able to say "delete all the black
lines, keep only the blue text", but, sufficient would be:

Find the cell I described, and replace contents with "Thing 2". I can't
find any way to even have it FIND a cell where the contents have a line break.

Seems I should be able to say find <click on the cell>.
 
D

Dave Peterson

If you want to delete everything through the alt-enter, you could use:

Select the Range
edit|replace
what: *(ctrl-j) Asterisk, followed by ctrl-j
with: leave blank
replace all

Be careful if you have multiple alt-enters in that range.

I think it was xl2002 that enhanced the edit|find to be non-modal. (For sure,
it's in xl2003.)

But won't ctrl-f, enter
do what you want?
 
G

Guest

If you want to delete everything through the alt-enter, you could use:
what: *(ctrl-j) Asterisk, followed by ctrl-j
with: leave blank
Be careful if you have multiple alt-enters in that range.

What is CTRL+J? I have tried excel help and general web and can't find it.
Not in the excel shortcuts list either. It does something strange in that
edit dialog.

I tried *(J)* , *(J), and (J)* and at best it would delete everything AFTER
the alt-enter.

Retyping anything was difficult. selecting the contents of the find text
box and backspace left whatever the ctrl-j put in there (which I could only
see with the down-arrow button next to that text box).

You're right, it's not modal in 2003... rather, it won't get out of your way
(stays on top) and you have to click on the button for a find next... or hit
enter (thanks, that wasn't obvious, the default button highlight is VERY
faint).

So, yeah, after an edit you can ctrl-f again and hit enter and cycle through
using just enter. Totally non-standard find behaviour that's not as nice as
the usual, but not as bad as I thought. I'll have to look into what that "go
to" they stuck on ctrl-g does.
 
D

Dave Peterson

ctrl-j is the alt-enter. Another way to enter alt-0010 on the numeric keypad.

*(ctrl-j) should delete everything through the last alt-enter keeping text
after that last alt-enter.

(ctrl-j)* should delete everything from the first alt-enter through the rest of
the value.

*(ctrl-j)* should clear all the cells that contain at least one alt-enter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top