ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing a String to a Range (https://www.excelbanter.com/excel-programming/369877-changing-string-range.html)

[email protected]

Changing a String to a Range
 
Hi

Basically, I just want to know if there is any (easy) way of changing a
string (as in, a cell in Excel contains a 3D cell range as text) to the
appropriate range.

So, in cell K12 I have the following text :
'Quarter 1 Contract 03'!C12,'Quarter 1 Spot 03'!C12,'Quarter 2 Contract
03'!C12,'Quarter 2 Spot 03'!C12,'Quarter 3 Contract 03'!C12,'Quarter 4
Contract 03'!C12,'Quarter 4 Spot 03'!C12

And I want to change this to a range in VBA so I can COUNTIF (cells <
0)!

If I havent explained properly, say and I'll try harder!

Thanks!


Gary Brown

Changing a String to a Range
 
Example:
Union(Range("A1:B2"), Range("C7:D8"))
--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of the
post.



" wrote:

Hi

Basically, I just want to know if there is any (easy) way of changing a
string (as in, a cell in Excel contains a 3D cell range as text) to the
appropriate range.

So, in cell K12 I have the following text :
'Quarter 1 Contract 03'!C12,'Quarter 1 Spot 03'!C12,'Quarter 2 Contract
03'!C12,'Quarter 2 Spot 03'!C12,'Quarter 3 Contract 03'!C12,'Quarter 4
Contract 03'!C12,'Quarter 4 Spot 03'!C12

And I want to change this to a range in VBA so I can COUNTIF (cells <
0)!

If I havent explained properly, say and I'll try harder!

Thanks!




All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com