Hello Experts!
I've written some code that prompts the user to indicate which column
two type of data appear in.
I then want to select those two columns, which may not be next to each
other, to copy to another sheet.
I've tried both versions below but neither work! Can anyone tell me
where I'm going wrong?
Columns(ISBNCol amp; quot;,quot; amp; QtyCol).Select
Columns(ISBNCol, QtyCol).Select
Thanks
Colin--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: www.excelforum.com/member.php...oamp;userid=10472
View this thread: www.excelforum.com/showthread...hreadid=507283Union(Columns(ISBNCol), Columns(QtyCol)).Select
But you don't usually have to select a range to work with it.Colin Vicary wrote:
gt;
gt; Hello Experts!
gt;
gt; I've written some code that prompts the user to indicate which column
gt; two type of data appear in.
gt;
gt; I then want to select those two columns, which may not be next to each
gt; other, to copy to another sheet.
gt;
gt; I've tried both versions below but neither work! Can anyone tell me
gt; where I'm going wrong?
gt;
gt; Columns(ISBNCol amp; quot;,quot; amp; QtyCol).Select
gt; Columns(ISBNCol, QtyCol).Select
gt;
gt; Thanks
gt;
gt; Colin
gt;
gt; --
gt; Colin Vicary
gt; ------------------------------------------------------------------------
gt; Colin Vicary's Profile: www.excelforum.com/member.php...oamp;userid=10472
gt; View this thread: www.excelforum.com/showthread...hreadid=507283
--
Dave Peterson
Colin,
It depends on what ISBNCol and QtyCol a numbers, ranges, strings?
If numbers (3, 5, for example) or strings (quot;Cquot;, quot;Equot;, for example):
Union(Columns(ISBNCol), Columns(QtyCol)).Select
If ranges:
Union(ISBNCol.EntireColumn, QtyCol.EntireColumn).Select
HTH,
Bernie
MS Excel MVPquot;Colin Vicaryquot; gt; wrote in message
news:Colin.Vicary.22k66y_1138810501.1725@excelforu m-nospam.com...
gt;
gt; Hello Experts!
gt;
gt; I've written some code that prompts the user to indicate which column
gt; two type of data appear in.
gt;
gt; I then want to select those two columns, which may not be next to each
gt; other, to copy to another sheet.
gt;
gt; I've tried both versions below but neither work! Can anyone tell me
gt; where I'm going wrong?
gt;
gt; Columns(ISBNCol amp; quot;,quot; amp; QtyCol).Select
gt; Columns(ISBNCol, QtyCol).Select
gt;
gt; Thanks
gt;
gt; Colin
gt;
gt;
gt; --
gt; Colin Vicary
gt; ------------------------------------------------------------------------
gt; Colin Vicary's Profile: www.excelforum.com/member.php...oamp;userid=10472
gt; View this thread: www.excelforum.com/showthread...hreadid=507283
gt;
Genius!
Thank you, worked perfectly.
Colin--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: www.excelforum.com/member.php...oamp;userid=10472
View this thread: www.excelforum.com/showthread...hreadid=507283
- Jul 20 Thu 2006 20:08
Selecting Non-Consecutive Variables
close
全站熱搜
留言列表
發表留言