LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
magix
 
Posts: n/a
Default Check COlumn - Excel VBA

Hi,

In excel VBA code, I have:

If ActiveCell.Column =1 Then
Msg "It is Column A Only"
Else
Msg "It is NOT Column A"
End If


But How can I check if the selection is actually More than Column A.
Example: When user select cell in column A (A11) and cell in column B (B11),
if use above code, it will still prompt "It is Column A Only". I want to
avoid that because B11 is included.

I think I should have something like:

If ActiveCell.Column =1 Then
' Check if there is other column included
If there is other column than column A included
Msg "Warning, it's NOT only Column A"
Else
Msg "It is Column A Only"
End If
Else
Msg "It is NOT Column A"
End If

Thanks in advance.

Regards.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Categorizing an excel column Anna Excel Discussion (Misc queries) 2 July 15th 05 07:32 AM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Check boxes in a column BenJAMMIN Excel Discussion (Misc queries) 5 April 9th 05 11:11 PM
Column A is Town, Column B is names. How can Excel add & tell how. Cindy Charts and Charting in Excel 3 January 13th 05 07:27 PM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 2 November 27th 04 01:55 AM


All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"