Check to see if cell value exists
I am using Excel 97 and want to be able to check to see if
a cell value on one sheet is already listed in a range on another sheet. If the cell value is listed then move to the next cell down, if not listed then copy the value of that cell into the next cell available in the range on the sheet. Can anyone assist with some code please? Thanks Mark |
Check to see if cell value exists
Have a look in the visual basic editor HELP for FIND
"Mark" wrote in message ... I am using Excel 97 and want to be able to check to see if a cell value on one sheet is already listed in a range on another sheet. If the cell value is listed then move to the next cell down, if not listed then copy the value of that cell into the next cell available in the range on the sheet. Can anyone assist with some code please? Thanks Mark |
Check to see if cell value exists
I can't find anything suitable in my HELP, I did try this
first! Can anyone else offer any more suggestions/code, please? -----Original Message----- Have a look in the visual basic editor HELP for FIND "Mark" wrote in message ... I am using Excel 97 and want to be able to check to see if a cell value on one sheet is already listed in a range on another sheet. If the cell value is listed then move to the next cell down, if not listed then copy the value of that cell into the next cell available in the range on the sheet. Can anyone assist with some code please? Thanks Mark . |
Check to see if cell value exists
Try this
It will look in each cell in Sheets("Sheet1").Range("a1:a10") If a cell value not exist in Sheet2 in column A it will copy the cell to the next available cell in sheet2 column A Sub Copy_test() For Each cell In Sheets("Sheet1").Range("a1:a10") If Application.WorksheetFunction.CountIf(Sheets("shee t2").Range("A:A") _ , cell.Value) = 0 Then cell.Copy Sheets("sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End If Next End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Mark" wrote in message ... I am using Excel 97 and want to be able to check to see if a cell value on one sheet is already listed in a range on another sheet. If the cell value is listed then move to the next cell down, if not listed then copy the value of that cell into the next cell available in the range on the sheet. Can anyone assist with some code please? Thanks Mark |
All times are GMT +1. The time now is 03:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com