Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Loop for updating data from sheet2 to sheet1 based with some rules

Dear all,

I like to get a macro to copy data from sheet2 to sheet1 based on some rules.

Sheet1 is the master with thousands of records masterdata in column A (names) and in Column AA, AB till AK registered referencedata.

Sheet2 is the called 'update sheet'. In a normal situation this sheet2 is empty except row1 with the headings. Column AA, AB till AK has the same headings as in sheet1.

When I have to update the specific data of a record in sheet1 (that means updating reference data of column AA, AB till AK) then I fill in, in sheet2, the mastername in column A and in column AA, AB till AK the to update data..

What should the macro do..... it's a loop (sheet2 record 2 till last used and for each record from column AA till AK).


1) Check for each record in sheet2 if the data in column A exist in sheet1 column A. If not then make cell patern of that record in sheet2 column A vbRed and go to next record.

2) If the data in sheet2 column A exist in sheet1 column A then look if column AA has data, if yes, copy this data to the record with the matching name of column A and register the data from sheet2 column AA to sheet1 the same column AA and set the fontcolor green if the cell in sheet1 of that column was empty and set it fontcolor red if there was already data which now is overwrite. Do the same for data in column AB, AC till AK of that record.

Hopely somebody can help me. THANKS!!

regards, Johan





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
How to copy row data from Sheet2 to Sheet1 based on Conditional Date John Lauer Excel Programming 2 June 22nd 11 04:13 PM
Automatic populate Sheet2 with data from Sheet1 based on criteria. Saurabh Khanna. Excel Discussion (Misc queries) 2 December 30th 08 02:19 PM
fetch the data from sheet2 & place it in sheet1 based on the locat Ren Excel Programming 5 January 12th 08 08:45 AM
Function on Sheet1 based on data on Sheet2 Sony Excel Worksheet Functions 0 February 7th 07 05:44 PM
copy data from sheet1 based on criteria in sheet2 to sheet3 Fred Excel Programming 3 May 25th 04 01:46 PM


All times are GMT +1. The time now is 07:21 AM.

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"