Hello everyone,
Thanks for all the great help on these forum, I've been reading lots and learning from all the great responses. This one seems to elude me.

I have named a set range equal to cell B8. I want to change the range if cell b8 contains only one hyphen and keep that range if it has 2 and warn if it has more than 2 hyphens.

so B8 looks usually like " 10-123-01" or "10-123"
Here is what the pseudo code looks like:

Set xlWkb = XL.Workbooks.Open(varFile) 'opening the workbook to upload
sheet = "Corr-Score" ' setting the sheet with the data needed
Set xlWks = xlWkb.Worksheets(sheet)
Set xlTestNoRng = xlWks.Range("B8")

If xlWks.Range.value *has 2 "-" then leave range as "B8"
If xlWks.Range.Value *has 1 "-" then change range to B6"