Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying cells by checking color of the cells


hi, sorry that I need help in creating the following:

column B of Ws2 contains the IDs(may have repetition).

When it runs, it will go to Ws1:column A to look for the same ID.

Search for the cells with color 'blue' on the whole row below the ID in
Ws1.

If there are 2 same ID(e.g. two of ID001) on Ws1:Column A, and 2 blue
colored cells that have fields "1" and "2" respectively under same
ID001. It will end up like this:

ID001: 1
ID001: 2

Then, copy those cells over to Ws2:column E on the same ID row.

Next, in Ws1, from the copied cell, go to row 121 of that column, copy
the fields in the (row 121:column with the blue copied cell), and paste
it over to Ws2:column D on the same ID row.

This is real hard for me as I tried it out alot of times, but failed..
I know its rather troublesome but really hope someone out there will
help me.. please..


--
JJJ010101
------------------------------------------------------------------------
JJJ010101's Profile: http://www.excelforum.com/member.php...o&userid=30766
View this thread: http://www.excelforum.com/showthread...hreadid=504311

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying cells by checking color of the cells


JJJ010101 Wrote:
hi, sorry that I need help in creating the following:

column B of Ws2 contains the IDs(may have repetition).

When it runs, it will go to Ws1:column A to look for the same ID.

Search for the cells with color 'blue' on the whole row below the ID in
Ws1.

If there are 2 same ID(e.g. two of ID001) on Ws1:Column A, and 2 blue
colored cells that have fields "1" and "2" respectively under same
ID001. It will end up like this:

ID001: 1
ID001: 2

Then, copy those cells over to Ws2:column E on the same ID row.

Next, in Ws1, from the copied cell, go to row 121 of that column, copy
the fields in the (row 121:column with the blue copied cell), and paste
it over to Ws2:column D on the same ID row.

This is real hard for me as I tried it out alot of times, but failed..
I know its rather troublesome but really hope someone out there will
help me.. please..


Your problem is not very clear. Col B of WS2 has IDs and there can be
duplicates. That means more than one row, say two rows, under col B of
Ws2 have same ID- say ID001. Now you want to go to WS1 scan Col A and
look for same ID ID001. If it finds any row in this col A with ID001
then you want to scan that row for blue cells. Can it encounter more
than on blue cell? upto how many cols you want to scan? ( Does WS2
table has fixed number of cols?). If there are say two blue cells in
row with values "1" and "2". Should it go for further scanning of col A
for more occurences of ID001? If it finds more such occurences and more
corresponding blue cells, what do you want to do? e.g for ID001 you may
get data from WS2 like
ID001 1 2
ID001 3 4

You said you want to copy this data to Col E of WS1 in the row where
colA has ID001. But data obtained from WS2 will require two rows and
two cols ( total number of values obtained are 4 - "1","2","3" and "4"
). Should this data be pasted in col E and ColF and two adjacent rows?
Since colB of WS2 may have multiple occurence of ID001 should this be
repeated every time ID001 is encountered in ColB? Similarly not clear
what you want to copy to WS2. Please define your problem clearly.
Especially with the assumption that there can be multiple instancess of
same ID in ColB of WS2 and ColA of WS1 and again multiple instances of
blue cells across an ID in WS1, it is not clear what you want to do. We
will try out something once problem is clear.

A V Veerkar


--
avveerkar
------------------------------------------------------------------------
avveerkar's Profile: http://www.excelforum.com/member.php...o&userid=30338
View this thread: http://www.excelforum.com/showthread...hreadid=504311

Reply
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
Cells won't change font color or show hi-lighted cells in document ROBIN Excel Discussion (Misc queries) 1 March 27th 08 09:39 PM
Checking the Cells in Sheet1 with Cells in Sheet2 and replace Checking the cells in Sheet1 with Sheet2 Excel Worksheet Functions 1 August 19th 06 09:29 AM
Fill cells with color based on criteria in two cells AA Excel Worksheet Functions 2 January 2nd 06 11:29 PM
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? Moore New Users to Excel 1 June 15th 05 06:41 PM
How do I skip blank cells when copying over a range of cells? tawells Excel Discussion (Misc queries) 2 June 7th 05 09:36 PM


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

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

About Us

"It's about Microsoft Excel"