Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2007

Tip: Looking for answers? Try searching our database.

Selecting highlighted data from one column and placing them in another column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ranjan.khan@comcast.net - 19 Sep 2007 18:43 GMT
Hi,

I have data in Column A. Some of the rows in Column A are highlighted
in yellow.

I would like to copy the highlighted data and paste them into Column
B.

For Example:

Column A

2342
1234
2121
5675
2321

Let's assume that 2342 and 2121 are highlighted.

So my resullt in Column B will be:

2342
2121

Keep in mind that I have n numbers of data in Column A.
Sandy Mann - 19 Sep 2007 19:15 GMT
Try this Macro:

Sub Colour()
   Dim bCol As Long
   Dim x As Long

   bCol = 2

   For x = 2 To 1000 'increase as required
       If Cells(x, 1).Interior.ColorIndex > 0 Then
           Cells(bCol, 2) = Cells(x, 1).Value
               bCol = bCol + 1
       End If

   Next x

End Sub

Signature

HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk

> Hi,
>
[quoted text clipped - 22 lines]
>
> Keep in mind that I have n numbers of data in Column A.
ranjan.khan@comcast.net - 19 Sep 2007 19:37 GMT
> Try this Macro:
>
[quoted text clipped - 54 lines]
>
> > Keep in mind that I have n numbers of data in Column A.

Thank you. It works perfectly.
Sandy Mann - 19 Sep 2007 19:51 GMT
You're welcome, thanks for the feedback.

Signature

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk

>> Try this Macro:
>>
[quoted text clipped - 56 lines]
>
> Thank you. It works perfectly.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.