Solved

Find/Replace text in Excel 2001

Posted on 2012-03-15
16
190 Views
Last Modified: 2012-03-16
Should be easy, but i'm in a crunch and need help fast.

I have a column:

PROC5 Provider




Q-67047



Q-39884

Q-22709
Q-97099

Q-60021


I want to keep all the blank rows blank, and change any field that has data (all starting wtih Q) to the text "Midas"

Help please :)

Thanks in advance.
0
Comment
Question by:slatefamily
  • 9
  • 3
  • 2
  • +2
16 Comments
 
LVL 11

Expert Comment

by:netballi
Comment Utility
Hello,

try the following formula in column B1, assuming the data is in column A

=IF(ISBLANK(A1),"",CONCATENATE("Q-",A1))
0
 
LVL 6

Expert Comment

by:wshark83
Comment Utility
try CTRL H- and find Q- and replace with text but this will keep the numbers

alternatively here's a macro which will do that (you will need to change the range("A1:A15"):

Sub Workbook_BeforePrint()
    Dim r As Range
    Set r = ThisWorkbook.Sheets(1).Range("A1:A15")
    For Each cell In r
        If IsEmpty(cell) Then
        ElseIf LCase(Mid(cell.Value, 1, 1)) = "q" Then cell.Value = "Midas"
          Exit For
        End If
    Next
End Sub
0
 

Author Comment

by:slatefamily
Comment Utility
well I was able to use this formula to do what I needed it to:

=SUBSTITUTE(FA14, FA14, "Midas")
0
 

Author Comment

by:slatefamily
Comment Utility
I wanted to take out the whole cell that contained any text and replace it with a generic term.  The substitution formula I found online is what helped me, I am not sure this was the correct way to do it but I achieved what I needed.  If anyone else can post a way to do it without using another column field, I would still be interested.
0
 
LVL 13

Accepted Solution

by:
lee555J5 earned 500 total points
Comment Utility
Do you have to have a formula or VBA? If not, use wshark83's suggestion but with a wildcard.

Hit [Ctrl-H]
Find what: Q-*
Replace with: Midas

Lee
0
 

Author Comment

by:slatefamily
Comment Utility
I was hoping to use something like that but I got an error

Doc1.doc
0
 

Author Comment

by:slatefamily
Comment Utility
I couldn't get the macro to work.
0
 
LVL 13

Expert Comment

by:lee555J5
Comment Utility
Are you using Excel 2010, and your question title "Excel 2001" is a typo?

I just tested this on 2 boxes running Win7 SP1 64bit and Office 2010 SP1 32bit. If a single cell is selected, it does the whole sheet. If more than 1 cell is selected, it works only on the selected range. Mine seems to be doing exactly what you need yours to do, I don't know why yours isn't working.

Are your cells containing "Q-*" just data cells, or is the "Q-*" the result of a formula?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 85

Expert Comment

by:Rory Archibald
Comment Utility
Your data are actually formulas. Use:

Find: ="Q-*"
Replace: Midas
0
 

Author Comment

by:slatefamily
Comment Utility
Does not work.  Microsoft Excel cannot find any data to replace.  Check to see if your data and formatting are correct.
0
 

Author Comment

by:slatefamily
Comment Utility
TYPO, it is 2007
0
 

Author Comment

by:slatefamily
Comment Utility
lee555J5,

The cells contaning Q- are just text.
0
 

Author Closing Comment

by:slatefamily
Comment Utility
I got it to work!
0
 
LVL 13

Expert Comment

by:lee555J5
Comment Utility
What made it work? What fixed it?
0
 
LVL 6

Expert Comment

by:wshark83
Comment Utility
i tested the macro and that worked so strange why it didn't work on yours....well done atleast its solved
0
 

Author Comment

by:slatefamily
Comment Utility
I think why it originally didn't work for either (macro included), was because the file was protected.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now