Range to stop at bold cell

Status
Not open for further replies.

colmguckian

New Member
Joined
Feb 11, 2011
Messages
35
I have a code which defines Range1 as Range("A" & I, "A" & I + 15).Name = "Range1
Instead Of adding the 15 rows to the range, I would like the range
to stop one row before the next bold cell.
What would i need to do to the below code to achieve this

Dim I As Integer, DFuzzyMatchByWord As Double, C As Range
For I = 1 To 500
DFuzzyMatchByWord = FuzzyMatchByWord((ComboBox2.Value), Workbooks("Book1").Worksheets("Sheet1").Range("A" & I).Value)
If DFuzzyMatchByWord > 80 Then
Workbooks("Book1").Worksheets("Sheet1").Range("A" & I, "A" & I + 15).Name = "Range1"
End If
Next I
<!-- / message -->
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Duplicate to http://www.mrexcel.com/forum/showthread.php?t=535485

Please do not post the same question multiple times. Questions of a duplicate nature will be locked or deleted, per the Posting Rules (especially points 21-23).

You didn't provide any further information about what didn't work with my code or more information about your data, layout etc in that other thread so I wasn't able to suggest anything further.

Please post any bumps, clarifications, or follow-ups back to the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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