UBound(Z) has worked for years but the only thing that changed is Windows 8

USAMax

Well-known Member
Joined
May 31, 2006
Messages
855
Office Version
  1. 365
Platform
  1. Windows
I admit that UBound is the one command that I use that I do not understand but it has worked consistently for years. I upgraded to Windows 8 last week and today for the first time I found that this command is not working.

BadQueryList = Array("spider", "MyBackyardFurniture", "Teak Yard Furniture", "Wicker Yard Furniture")

Z = Filter(BadQueryList, Cells(CurRow, 1))
If UBound(Z) = 0 Then
For Each s In BadQueryList
If s = Cells(CurRow, 1) Then DelRow = True
Next s
End If

I enter new words that I do not want in my spreadsheet into the array and when it is found the row is marked to be deleted. In this case the new phrase that is imported from Google WebMaster or Google Analytics is, "outdoor wicker and spiders" and I do not want to rank for this phrase so I want to remove any row with the word, "spider".

This is just the newest word I have added and I fear that this is not working with any word or phrase.

I have Office 2010 with Windows 8.

Thank you,

Dave
 
Dave

I've just tried the code and it works fine, it finds spider and the upper bound of Z is 0.

How isn't it working for you?

By the way, is there a reason you are using Filter? Perhaps something to do with partial matches?

PS I changed to Windows 8 a few weeks ago and I've noticed no changes in the behaviour of any applications.
 
Upvote 0
Dave

I've just tried the code and it works fine, it finds spider and the upper bound of Z is 0.

How isn't it working for you?

By the way, is there a reason you are using Filter? Perhaps something to do with partial matches?

PS I changed to Windows 8 a few weeks ago and I've noticed no changes in the behaviour of any applications.



I am so sorry Norie but I must have had a complete brain fart yesterday. I added the word to the routine for complete phrases when I should have added it to the routine for single words. I mentioned that I didn't completely understand UBound and you were right, it found the word but the IF statement after it did not match the word to the phrase.

Thank you Norie for your reply,

Dave
 
Upvote 0

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