ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Union question (https://www.excelbanter.com/excel-programming/302537-union-question.html)

ToddG

Union question
 
I have a string similar to the following (the underscore
is a blank space):

_49 x 1.5 Total

49 and 1.5 come from ranges in a worksheet

I need to assign this string to a variable. I tried the
following, but I can't get it to work (doesn't seem to
like the blank spaces):

NewBF = Union(" ", Sheets("PanelChange").Range("C1"), _
" " x ", Sheets("PanelChange").Range("D1"), " ", "Total")

Any advice on this?

TIA,

Todd




Bob Phillips[_6_]

Union question
 
NewBF = " " & Sheets("PanelChange").Range("C1") & _
" x " & Sheets("PanelChange").Range("D1") & _
" " & "Total"


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
I have a string similar to the following (the underscore
is a blank space):

_49 x 1.5 Total

49 and 1.5 come from ranges in a worksheet

I need to assign this string to a variable. I tried the
following, but I can't get it to work (doesn't seem to
like the blank spaces):

NewBF = Union(" ", Sheets("PanelChange").Range("C1"), _
" " x ", Sheets("PanelChange").Range("D1"), " ", "Total")

Any advice on this?

TIA,

Todd






ToddG

Union question
 
Thanks once again Bob. Thought i'd have to use the Union.
-----Original Message-----
NewBF = " " & Sheets("PanelChange").Range("C1") & _
" x " & Sheets("PanelChange").Range("D1")

& _
" " & "Total"


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in

message
...
I have a string similar to the following (the underscore
is a blank space):

_49 x 1.5 Total

49 and 1.5 come from ranges in a worksheet

I need to assign this string to a variable. I tried the
following, but I can't get it to work (doesn't seem to
like the blank spaces):

NewBF = Union(" ", Sheets("PanelChange").Range("C1"), _
" " x ", Sheets("PanelChange").Range

("D1"), " ", "Total")

Any advice on this?

TIA,

Todd





.


Bob Phillips[_6_]

Union question
 
No, Union joins ranges not strings

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in message
...
Thanks once again Bob. Thought i'd have to use the Union.
-----Original Message-----
NewBF = " " & Sheets("PanelChange").Range("C1") & _
" x " & Sheets("PanelChange").Range("D1")

& _
" " & "Total"


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ToddG" wrote in

message
...
I have a string similar to the following (the underscore
is a blank space):

_49 x 1.5 Total

49 and 1.5 come from ranges in a worksheet

I need to assign this string to a variable. I tried the
following, but I can't get it to work (doesn't seem to
like the blank spaces):

NewBF = Union(" ", Sheets("PanelChange").Range("C1"), _
" " x ", Sheets("PanelChange").Range

("D1"), " ", "Total")

Any advice on this?

TIA,

Todd





.





All times are GMT +1. The time now is 12:58 AM.

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