Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default AVOIDING DUPLICATES IN A RANGE OF CELLS

Hi Everyone,
I am very new to Excel and I need to enter a series of figures into a range
of cells, say 1 to 400. How do I ensure that:

a) only figures are accepted, and must be between 1 & 400
b) the figures are not duplicated?

Thanks for your assistance.
--
Glint
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default AVOIDING DUPLICATES IN A RANGE OF CELLS

Use Data Validation.

Select all your cells, let's assume it is H1:Hn

DataValidation, change allow type to Custom and add a formula of

=AND(H11,H1<=400,COUNTIF($H$1:H1,H1)=1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Glint" wrote in message
...
Hi Everyone,
I am very new to Excel and I need to enter a series of figures into a

range
of cells, say 1 to 400. How do I ensure that:

a) only figures are accepted, and must be between 1 & 400
b) the figures are not duplicated?

Thanks for your assistance.
--
Glint



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default AVOIDING DUPLICATES IN A RANGE OF CELLS

Thanx Bob, but can you spoon-feed me a little? It is so bad I even have
difficulty entring the formula.
The range is B2:Z26. I need to enter 1 to 225 without duplicating any
number. Nulls are allowed. How do I do it?
--
Glint


"Bob Phillips" wrote:

Use Data Validation.

Select all your cells, let's assume it is H1:Hn

DataValidation, change allow type to Custom and add a formula of

=AND(H11,H1<=400,COUNTIF($H$1:H1,H1)=1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Glint" wrote in message
...
Hi Everyone,
I am very new to Excel and I need to enter a series of figures into a

range
of cells, say 1 to 400. How do I ensure that:

a) only figures are accepted, and must be between 1 & 400
b) the figures are not duplicated?

Thanks for your assistance.
--
Glint




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default AVOIDING DUPLICATES IN A RANGE OF CELLS

Hi Glint,
Looks like you've changed from 400 to 225, so the formula should be...

=AND(B2=1,B2<=225,COUNTIF($B$2:Z26,B2)=1)

If so, try these steps to get it in place and working...

1. Select B2:Z26
2. Go Data|Validation...
3. On the Settings Tab of the Data Validation dialog, click in the
Allow: box and select Custom.
4. Type the above formula into the Formula: box
5. If you want a message to appear when a cell in the range is selected
add it to the Input Message Tab of the Data Validation dialog
6. If you want a warning Error Alert message displayed when the user
tries to enter an invalid value then add it to the Error Alert tab of
the Data Validation dialog.
7. Click OK.

Ken Johnson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default AVOIDING DUPLICATES IN A RANGE OF CELLS

Thanx Ken. I did not realize at first that the formula only works in a blank
worksheet. I had problems with one that had data.
--
Glint


"Ken Johnson" wrote:

Hi Glint,
Looks like you've changed from 400 to 225, so the formula should be...

=AND(B2=1,B2<=225,COUNTIF($B$2:Z26,B2)=1)

If so, try these steps to get it in place and working...

1. Select B2:Z26
2. Go Data|Validation...
3. On the Settings Tab of the Data Validation dialog, click in the
Allow: box and select Custom.
4. Type the above formula into the Formula: box
5. If you want a message to appear when a cell in the range is selected
add it to the Input Message Tab of the Data Validation dialog
6. If you want a warning Error Alert message displayed when the user
tries to enter an invalid value then add it to the Error Alert tab of
the Data Validation dialog.
7. Click OK.

Ken Johnson




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default AVOIDING DUPLICATES IN A RANGE OF CELLS

What do you mean that it only works in a blank worksheet? There is no point
if the workbook is blank.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Glint" wrote in message
...
Thanx Ken. I did not realize at first that the formula only works in a

blank
worksheet. I had problems with one that had data.
--
Glint


"Ken Johnson" wrote:

Hi Glint,
Looks like you've changed from 400 to 225, so the formula should be...

=AND(B2=1,B2<=225,COUNTIF($B$2:Z26,B2)=1)

If so, try these steps to get it in place and working...

1. Select B2:Z26
2. Go Data|Validation...
3. On the Settings Tab of the Data Validation dialog, click in the
Allow: box and select Custom.
4. Type the above formula into the Formula: box
5. If you want a message to appear when a cell in the range is selected
add it to the Input Message Tab of the Data Validation dialog
6. If you want a warning Error Alert message displayed when the user
tries to enter an invalid value then add it to the Error Alert tab of
the Data Validation dialog.
7. Click OK.

Ken Johnson




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
Copy column range of "single word" cells with spaces to a single c nastech Excel Discussion (Misc queries) 3 February 15th 06 05:04 PM
Macro to hide blank cells in a range Dave Excel Discussion (Misc queries) 1 February 1st 06 11:55 PM
Display first, second, etc Nonblank Cells in a Range Jeremy N. Excel Worksheet Functions 12 September 25th 05 01:47 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 11:38 PM.

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"