Force entry to one of three cells

  • Thread starter Thread starter Martin Smith
  • Start date Start date
M

Martin Smith

I have a sheet where users enter a value of an invoice in one of three
columns. These are Pounds sterling, US dollar and Euro. The invoice
will only ever be in one of the three currencies.

Can I flag a warning if values appear in more than one of the three
cells on each row?
 
Martin,

You can use Data Validation to prevent multiple entries.

Select the three columns, all rows, where the values might be entered.
Let's say columns A, B and C, starting in row 2. A2 will be the activecell.

Use Data | Validation...., select "Custom" under "Allow", and in the
"Formula" area, enter

=COUNTA($A2:$C2)=1

You can modify the message to reflect your constraints.

HTH,
Bernie
MS Excel MVP
 
Martin,

You can use Data Validation to prevent multiple entries.

Select the three columns, all rows, where the values might be entered.
Let's say columns A, B and C, starting in row 2. A2 will be the activecell.

Use Data | Validation...., select "Custom" under "Allow", and in the
"Formula" area, enter

=COUNTA($A2:$C2)=1

You can modify the message to reflect your constraints.

HTH,
Bernie
MS Excel MVP

That works great.

Thank you very much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top