+ Reply to Thread
Results 1 to 5 of 5

Worksheet_Change not recognizing certain values

  1. #1
    Registered User
    Join Date
    12-20-2019
    Location
    South Dakota
    MS-Off Ver
    365
    Posts
    56

    Worksheet_Change not recognizing certain values

    I am trying to use the worksheet function to unhide certain rows... just for whatever... whatever...

    Anyways, problem is certain characters do not exist to be recognized in vba code. ₂ apparently doesn't work... which is annoying that subscripting a 2 doesn't carry through references. I am also needing to look at greek scripting, such as mu (μ).

    Another part that really bugs me, I am not sure what is having a hiccup out of these options:

    Please Login or Register  to view this content.
    The first, second, fourth, and fifth all work... when those values are input into the targeted cell then it correctly unhides the values on sheet 45. But the third case doesn't ever work. I don't get why. If it doesn't like the "Fd" then why does it work on the second case... and it isn't like it is having an issue with the "lb/hr" because the fifth case works.

    In attached workbook, the worksheet change references to the second tab "RATA", Sheet46, cell B1... and will be through B13 once I get B1 working. The error does not only occur with the above Cases, a similar type of casing applies under other gas types and it is always the lb/hr-Fd that doesn't work. Far as I can tell, everything else doesish (again, minus the mu until I figure my alternative...).


    Thanks for any help!
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Worksheet_Change not recognizing certain values

    I ran the code by selecting a val from the validation dropdown and none of the 5 executionary lines you references worked. the value I chose was: Nitrogen Oxides, Emissions, lb/hr-Fd. and I had rows 70 - 77 hidden. and when the code ran that included the 5 lines you posted:
    Please Login or Register  to view this content.
    none of the lines 70 - 77 were unhidden.

    I even tried this:
    Please Login or Register  to view this content.
    and the row didn't become unhidden.

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Worksheet_Change not recognizing certain values

    Quote Originally Posted by vba_php View Post
    I ran the code by selecting a val from the validation dropdown and none of the 5 executionary lines you references worked. the value I chose was: Nitrogen Oxides, Emissions, lb/hr-Fd. and I had rows 70 - 77 hidden. and when the code ran that included the 5 lines you posted:
    Please Login or Register  to view this content.
    none of the lines 70 - 77 were unhidden.

    I even tried this:
    Please Login or Register  to view this content.
    and the row didn't become unhidden.
    There is a space at the end of that entry (and probably on others as well) which is stopping it from matching.

    If you change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    All should work
    Last edited by pjwhitfield; 09-20-2020 at 04:17 AM.
    If someone has helped you then please add to their Reputation

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Worksheet_Change not recognizing certain values

    Quote Originally Posted by pjwhitfield View Post
    There is a space at the end of that entry (and probably on others as well) which is stopping it from matching.

    If you change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    All should work
    hmmmmm....interesting. thanks! obviously I did not check that, nor did I intend to. but I'm sure he/she will make good use of that advice of yours.

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Worksheet_Change not recognizing certain values

    Quote Originally Posted by hk57 View Post
    ... certain characters do not exist to be recognized in vba code ...
    ... I am also needing to look at greek scripting, such as mu (μ) ...
    You must use unicode => for greek characters, it seems to me that these are codes from 911 to 974.

    Quote Originally Posted by hk57 View Post
    Please Login or Register  to view this content.
    Your code could be standardized, because the identified phrases for the "B2" to "B13" sections are identical in your code.
    The differences are between searched phrases for "B1" in relation to the "B2", "B3", ...., "B13" sections:
    (the differences - mainly - are overabundance of spaces and additionally "minus"/dash signs)

    B1 ==> B2:B13
    -------------------------------------------------------------------------
    Velocity, ft/sc ==> Velocity , ft/sc
    Velocity, ft/min ==> Velocity , ft/min
    Velocity, m/sec ==> Velocity , m/sec

    Sulfur Dioxide, Conc., ppmdv @%O2 ==> Sulfur Dioxide, Conc. at 4% Oxygen, ppmw @4% O?
    Sulfur Dioxide, Emissions, lb/mmBTU-Fd ==> Sulfur Dioxide, Emissions, lb/mmBTU Fd
    Sulfur Dioxide, Emissions, lb/hr-Fd ==> Sulfur Dioxide, Emissions, lb/hr Fd
    Sulfur Dioxide, Emissions, lb/mmBTU-Fc ==> Sulfur Dioxide, Emissions, lb/mmBTU Fc
    Sulfur Dioxide, Emissions, lb/hr-Fc ==> Sulfur Dioxide, Emissions, lb/hr Fc

    Nitrogen Oxides, Conc., ppmdv @%O2 ==> Nitrogen Oxides, Conc. at 4% Oxygen, ppmw @4% O?
    Nitrogen Oxides, Emissions, lb/mmBTU-Fd ==> Nitrogen Oxides, Emissions, lb/mmBTU Fd
    Nitrogen Oxides, Emissions, lb/hr-Fd ==> Nitrogen Oxides, Emissions, lb/hr Fd
    Nitrogen Oxides, Emissions, lb/mmBTU-Fc ==> Nitrogen Oxides, Emissions, lb/mmBTU Fc
    Nitrogen Oxides, Emissions, lb/hr-Fc ==> Nitrogen Oxides, Emissions, lb/hr Fc

    Carbon Monoxide, Conc., ppmdv @%O2 ==> Carbon Monoxide, Conc. at 4% Oxygen, ppmw @4% O?
    Carbon Monoxide, Emissions, lb/mmBTU-Fd ==> Carbon Monoxide, Emissions, lb/mmBTU Fd
    Carbon Monoxide, Emissions, lb/hr-Fd ==> Carbon Monoxide, Emissions, lb/hr Fd
    Carbon Monoxide, Emissions, lb/mmBTU-Fc ==> Carbon Monoxide, Emissions, lb/mmBTU Fc
    Carbon Monoxide, Emissions, lb/hr-Fc ==> Carbon Monoxide, Emissions, lb/hr Fc

    Total Hydrocarbons, Conc., ppmwv @%O2 ==> THC at 3% Oxygen wet, ppmw @3% O?
    Total Hydrocarbons, Conc., ppmdv @%O2 ==> THC at 3% Oxygen dry, ppmd @3% O?
    Total Hydrocarbons, Emissions, lb/mmBTU-Fd ==> Total Hydrocarbons, Emissions, lb/mmBTU Fd
    Total Hydrocarbons, Emissions, lb/hr-Fd ==> Total Hydrocarbons, Emissions, lb/hr Fd
    Total Hydrocarbons, Emissions, lb/mmBTU-Fc ==> Total Hydrocarbons, Emissions, lb/mmBTU Fc
    Total Hydrocarbons, Emissions, lb/hr-Fc ==> Total Hydrocarbons, Emissions, lb/hr Fc


    You should make yourself an additional sheet that will be a dictionary of searched phrases.
    On its basis, the code will identify the given phrase depending on the cell.
    Otherwise, if the number of searched phrases increases, your code will be like "The South Dakota Chainsaw Massacre" ...

    Sample schema:

    Sheet "RATA" module:
    Please Login or Register  to view this content.
    Standard module:
    Please Login or Register  to view this content.
    Attached Images Attached Images

+ 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. [SOLVED] Excel Not recognizing a value / adding values to array without spaces
    By Buzz1126 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2016, 01:04 PM
  2. Web Form not recognizing values being entered with Excel VBA
    By Quagmire in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2016, 06:22 PM
  3. Charts not recognizing label column. Chart values appear to be fine.
    By chad.botbyl in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-13-2016, 05:26 AM
  4. Prevent Pivot from recognizing blank array cells for grouped date values
    By Miskondukt in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-31-2016, 08:34 PM
  5. [SOLVED] Excel not recognizing values, presenting incorrect data
    By jenniferjarvis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-02-2016, 09:13 PM
  6. Sorting by recognizing values in a list
    By alexander.aberg in forum Excel General
    Replies: 2
    Last Post: 02-06-2011, 10:05 AM
  7. Excel not recognizing values as equal
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 04-23-2010, 05:39 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