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
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
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.
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.
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.
For cells with one word/string, it's not difficult to do as you could use this to compare.
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.Please Login or Register to view this content.
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:
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.Please Login or Register to view this content.
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.
Who or what are you calling 'silly', please?well of course you can use split. that's what I said before silly.
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.
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.
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?
more than likely there is only one error. this:
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,.Please Login or Register to view this content.
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.shall I say it was a test to see if it was ""crossing Dibbins' line""?
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?
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).
Please try
Please Login or Register to view this content.
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?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks