Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cells won't change font color or show hi-lighted cells in document | Excel Discussion (Misc queries) | |||
Checking the Cells in Sheet1 with Cells in Sheet2 and replace | Excel Worksheet Functions | |||
Fill cells with color based on criteria in two cells | Excel Worksheet Functions | |||
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? | New Users to Excel | |||
How do I skip blank cells when copying over a range of cells? | Excel Discussion (Misc queries) |