How to get rid of the equal signs.

francris

New Member
Joined
Mar 15, 2006
Messages
11
My daughter asked me if I could help her find a solution to this problem and I immediately thought of this forum. Many people here were quite helpful the last time I posted a question and I'm hoping that some of you would come through again. The type of work she's doing is beyond my limited skills using excel. I just hope I can describe the problem well enough for you to understand. I've attached an image of the file she's working on to better explain.

Doing this manually for over 300 entries is just too time consuming. Essentially what she wants is to eliminate the equal sign that appears in front of the entry that you see in the formula bar in the first image. Everything else must remain the same including the dashes. It should look like the one that appears in the second image. If she can eliminate the equal sign then she should be able to get the entry that appears in the formula bar minus the equal sign to show in column B. The equals sign seems to appear only when the entry is preceeded with a dash as she has some entries without dashes and they appear correctly as in the third image. In case you're curious the 4 different letters that you see in the entry represent the names of DNA sequence pairs.

tableaum0.jpg



tablebxh3.jpg



table2be8.jpg
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi Francris

Highlight the cells you want to change (ie B column cells) and do a Ctrl+H (replace function) and type an "=" in the Find What box (without the double quotes) and a "'" in the Replace With box (this is a single quote). That should produce the result your daughter wants.

Best regards

Richard
 
Upvote 0
Hi, francris
Welcome to the Board !!!!!
in case there are other "="signs within those cells, you could use some code
Code:
Sub test()
Dim arr
Dim I As Integer, J As Integer

arr = Selection.Formula

    For I = 1 To Selection.Rows.Count
        For J = 1 To Selection.Columns.Count
        If Left(arr(I, J), 1) = "=" Then arr(I, J) = "'" & Mid(arr(I, J), 2)
        Next J
    Next I

Selection.Formula = arr

End Sub
kind regards,
Erik
 
Upvote 0
Hi Francris

Since you seem not to want the first dash maybe do 2 Replaces:

First: Edit>Replace, in the Find What type =- and leave Replace With empty

This gets rid of the initial =- (equal sign followed by dash)

Second: Edit>Replace, in the Find What type = and leave Replace With empty

This gets rid of the initial = in the cells that did not have a dash after the equal sign.

Hope this helps
PGC
 
Upvote 0
I just can't believe how fast you guys are. Thanks very much! Your replies are much appreciated. Richard's was the first I tried and it worked great! Thanks Richard and thanks to the others. I'm going to try those as well.
 
Upvote 0

Forum statistics

Threads
1,226,231
Messages
6,189,774
Members
453,568
Latest member
LaTwiglet85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top