+ Reply to Thread
Results 1 to 15 of 15

Spell check - ignore words with more than 1 font

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Spell check - ignore words with more than 1 font

    Is there a way to use VBA so that a spell check ignores words with more than 1 font.

    The following is checked: Temperature
    The following is ignored: TempTwo

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

    Re: Spell check - ignore words with more than 1 font

    do you have code to post? it seems like you've already written it as an attempt. no? I seriously doubt this can be done. I mean, you would have to iterate through the chars one by one and check the font property of each byte, I would assume. Nothing else makes sense.

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Spell check - ignore words with more than 1 font

    Thanks for responding.
    The only code I have is generic.
    I was hoping for a built in function.
    I will try to loop through each cell then (and each character in each cell) and see how long it takes.

    Please Login or Register  to view this content.

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

    Re: Spell check - ignore words with more than 1 font

    there is no built-in function to do this. and there shouldn't be either. the request is way too unique. web languages can't even do it with built-in resources.

  5. #5
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Spell check - ignore words with more than 1 font

    For cells with one word/string, it's not difficult to do as you could use this to compare.
    Please Login or Register  to view this content.
    For multiple words, an array of strings can be created using:
    Please Login or Register  to view this content.
    But I'm having trouble working with the font of each character in each array.

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

    Re: Spell check - ignore words with more than 1 font

    well of course you can use split. that's what I said before silly. =) see here:

    https://docs.microsoft.com/en-us/off...split-function

    that KB says that this in cell A1:
    Please Login or Register  to view this content.
    when thrown into this:
    Please Login or Register  to view this content.
    where cell.value = CELL A1.VALUE, results in this:
    Please Login or Register  to view this content.
    and thus, I would assume doing the following would give you what you want, based on the information you have already found, if what you have said is really true:
    Please Login or Register  to view this content.
    obviously you can change that to use it to your advantage.

    https://docs.microsoft.com/en-us/off...p/mid-function

    https://docs.microsoft.com/en-us/off...cel.range.font

    https://docs.microsoft.com/en-us/off...l.font(object)

    https://docs.microsoft.com/en-us/off...xcel.font.name

    it's possible it won't work if actual CHARS pulled out of a range object into a literal are not recognized the same way an actual range value is recognized if you read it right out of the cell. but run it and find out. that's the only way to tell. the code I wrote is not the greatest in the world, but it'll work fine.
    Last edited by vba_php; 01-09-2021 at 07:31 AM.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Spell check - ignore words with more than 1 font

    well of course you can use split. that's what I said before silly.
    Who or what are you calling 'silly', please?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Spell check - ignore words with more than 1 font

    Thanks for looking into this.
    I'm getting errors and it's hard to pinpoint why.

    "Compile error : invalid qualifier", highlights "s" in "tFont = s.Font.Name"
    If I comment out this line, get error ""Compile error : Next without For"
    Replacing Next with Loop seems to give another error.

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

    Re: Spell check - ignore words with more than 1 font

    Quote Originally Posted by AliGW View Post
    Who or what are you calling 'silly', please?
    shall I say it was a test to see if it was ""crossing Dibbins' line""? Surely it wasn't. the ban was for rants, conspiracy theories and supposed insults to others. that was a joke. should I refrain completely from them, light-hearted or not? Should I just act like a robot and give strict answers in a technical sense and say not ONE word about anything else, even if it's remotely related to the subject matter of this forum? apparently the OP wasn't offended. good news, no?

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

    Re: Spell check - ignore words with more than 1 font

    Quote Originally Posted by Un-Do Re-Do View Post
    Thanks for looking into this.
    I'm getting errors and it's hard to pinpoint why.

    "Compile error : invalid qualifier", highlights "s" in "tFont = s.Font.Name"
    If I comment out this line, get error ""Compile error : Next without For"
    Replacing Next with Loop seems to give another error.
    more than likely there is only one error. this:
    Please Login or Register  to view this content.
    and that's what I was giving you the code for. if you read my post, I mentioned that I did not know if it would work because my code attempted to do something with literal values, when taken out of a range object's value. it was unknown whether excel would like it or not. apparently it doesn't. you can probably do it another way though,.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Spell check - ignore words with more than 1 font

    shall I say it was a test to see if it was ""crossing Dibbins' line""?
    Don't test us, Adam - it's really not a good idea. There is no good reason to call anyone 'silly'. Remember what you have been told: if you are here ONLY to help with Excel and ask your own questions, then that's fine. Anything else that breaches what Ford has given you as your 'bounds' is likely to get you thrown out. DON'T toy with us.

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

    Re: Spell check - ignore words with more than 1 font

    what I just mentioned are things that I am helping you with. you are being creative, and code creators like microsoft are NOT creative. they know nothing by procedure. thus, what you want to do is something they wouldn't understand whatsoever. however, you can manipulate all code from all manufacturers many ways. that is what I was showing you. follow?

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

    Re: Spell check - ignore words with more than 1 font

    Quote Originally Posted by AliGW View Post
    DON'T toy with us.
    Okie Dokie. but I've rarely seen anyone (I don't remember *anyone*, actually) complain about the playful attitude I've just shown this person. but sure, won't happen again. promise. don't show this to Dibbins. thanks. oh wait, he'll see it anyway. =( enjoy your day. I still plan on coming to England to visit this man:

    https://www.linkedin.com/in/james-morley-19b4a366/

    and if you're not totally disgusted with me by now, maybe I can stop by for tea as well (if I don't get slapped electronically for this post).

  14. #14
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Spell check - ignore words with more than 1 font

    Please try

    Please Login or Register  to view this content.

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

    Re: Spell check - ignore words with more than 1 font

    bo, what does that argument have to do with anything?

    https://docs.microsoft.com/en-us/off....msolanguageid

    according to that, I don't see the connection. help?

+ 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. Changing Spell Check language of Vba Spell Checker
    By jhelliar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2021, 03:51 AM
  2. Excel VBA, spell check to ignore data validation and text in shapes
    By Quagmire in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2016, 03:43 PM
  3. Replies: 1
    Last Post: 10-20-2014, 11:01 AM
  4. Spell Check and Grammar check in Particular Column
    By dhilipan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2013, 06:35 PM
  5. Can Spell check ignore file extensions?
    By simjambra in forum Word Formatting & General
    Replies: 2
    Last Post: 09-21-2009, 11:58 AM
  6. VBA Spell Check - Dont ask to check rest of Doc?
    By Chris424 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2008, 07:42 AM
  7. [SOLVED] Can I have spell check ignore errors and alert me to real words?
    By JenLynFish in forum Excel General
    Replies: 2
    Last Post: 05-09-2005, 03:37 PM

Tags for this Thread

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