Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Check if number already are in the sheet

Hi
Can some one help me
I need a code where i can write a number
maybe in a inputbox then the code shall see if the number i write already
are in the row, if Not write the number in the activecell , and if the are
there
error by msgbox or something like that

Hope some one can help


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Check if number already are in the sheet

You don't need a macro. You can use validation... Try this. Highlite column A
(A1 should be the active cell). Select Data|Format -Custom and add this
formula

=COUNTIF(A:A, A1) =1

Now try adding values into column A. It should not allow duplicates...
--
HTH...

Jim Thomlinson


"alvin Kuiper" wrote:

Hi
Can some one help me
I need a code where i can write a number
maybe in a inputbox then the code shall see if the number i write already
are in the row, if Not write the number in the activecell , and if the are
there
error by msgbox or something like that

Hope some one can help


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Check if number already are in the sheet

Thanks

Alvin


"Jim Thomlinson" skrev:

You don't need a macro. You can use validation... Try this. Highlite column A
(A1 should be the active cell). Select Data|Format -Custom and add this
formula

=COUNTIF(A:A, A1) =1

Now try adding values into column A. It should not allow duplicates...
--
HTH...

Jim Thomlinson


"alvin Kuiper" wrote:

Hi
Can some one help me
I need a code where i can write a number
maybe in a inputbox then the code shall see if the number i write already
are in the row, if Not write the number in the activecell , and if the are
there
error by msgbox or something like that

Hope some one can help


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 Activesheet for chart sheet or work sheet NSK Charts and Charting in Excel 1 July 17th 07 09:00 PM
Check if the first sheet is the selected sheet melody Excel Programming 3 September 13th 06 07:46 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
Check if sheet name is a number linglc Excel Programming 1 July 13th 06 04:13 AM
how to use sumif function to check date in 1 sheet is < 2 sheet Bharat Saboo Excel Worksheet Functions 3 December 30th 05 07:10 AM


All times are GMT +1. The time now is 11:26 AM.

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

About Us

"It's about Microsoft Excel"