Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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




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
Check to see if a value exists in a list? Pradhan Excel Worksheet Functions 6 April 2nd 23 06:35 PM
Check if text exists within a cell range and return logical vaule - possible? [email protected] Excel Discussion (Misc queries) 2 July 20th 07 02:29 AM
check if worksheet exists joeeng Excel Worksheet Functions 3 September 7th 05 06:49 PM
check if sheet exists Ross[_6_] Excel Programming 3 July 25th 03 06:46 PM
check if worksheet exists Craig Wilks Excel Programming 2 July 10th 03 04:07 AM


All times are GMT +1. The time now is 09:34 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"