+ Reply to Thread
Results 1 to 3 of 3

If cell contents begin with math operators, strip them

  1. #1
    Registered User
    Join Date
    01-15-2020
    Location
    Starksbobo, VT
    MS-Off Ver
    365
    Posts
    11

    If cell contents begin with math operators, strip them

    Hi,

    i've got a report from a company that i download weekly and which i add to a workbook of sales. The problem is as the workbook grows, it has gotten very slow. i think i've tracked down the problem to the fact that some of the cells begin with math operators (- + =) and Excel is trying to "calculate" them. i could be wrong, another issue i have is that i am frequently stopped while excel waits for another application to complete an OLE...Anyway, i am trying to come up with a vba solution to search the worksheet for cells that either begin with "- ", "+ ", or "= " (that is: the operator followed by a space), and trim those two characters out.

    i've attached a sample of one of the sheets. i believe the affected cells are all in column A if that helps to streamline things at all.

    Thank you all so much!

    chris
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: If cell contents begin with math operators, strip them

    Using Get and Transform on the DATA Tab.

    Mcode

    Please Login or Register  to view this content.
    You have a lot of empty cells than you may wish to also remove using Get and Transform. Look at the links in my signature about Power Query (renamed to Get and Transform with the 2016 release) to learn more if you are unfamiliar.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-15-2020
    Location
    Starksbobo, VT
    MS-Off Ver
    365
    Posts
    11

    Re: If cell contents begin with math operators, strip them

    Thank you, Alan. i will try that out later.

    The sheet has other sections that have different layouts (numbers might be in column 5 instead of 4, for instance), but i'm pretty sure the "problems" are limited to this upper section. Can this Get/Transform be applied to a range selection as opposed to the whole sheet?

    Thanks again!

    chris

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA - Math Operators
    By jsneak in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2019, 08:19 PM
  2. How to convert cell contents which contain numbers and operators Example: 7*7
    By larrylehman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-16-2013, 04:06 PM
  3. math operators ><=
    By cdmurph in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-17-2006, 09:30 AM
  4. [SOLVED] what exactly are relational operators in Excel? All math symbol?
    By JC in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  5. what exactly are relational operators in Excel? All math symbol?
    By JC in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. what exactly are relational operators in Excel? All math symbol?
    By Biff in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 09-06-2005, 09:05 AM
  7. what exactly are relational operators in Excel? All math symbol?
    By JC in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1