ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data List - Write to another cell with check (https://www.excelbanter.com/excel-programming/389284-data-list-write-another-cell-check.html)

magix

Data List - Write to another cell with check
 
Let say in excel cell A1 and B1, I created a List using Data Validation, and
put in value 1,2,3,N/A

So that cell A1 and B1 each will have drop down list 1,2,3, N/A

Now, How can I achieve following with formula:

- If in cell A1, after I select value 2 for example, it will check if B1 has
select the same value 3,

Pseudocode is like this:
If B1 is empty or B1 has N/A,
write value 2 that selected into Cell C1

else If B1 has the same value as A1( in this example: 2)
it will prompt error, saying that value 2 has been
selected in another cell.and user has to select other value in cell A1

else
Compare the value with cell B1.
if B1 value < A1 Value
write B1 value into Cell C1
else
write A1 value (which is 2) into Cell C1
end if
end if

same check goes to Cell B1


Please help.



magix

Data List - Write to another cell with check
 
To add on,
If in Cell A1, if I select N/A, no check will be done.

Same goes to Cell B1

"magix" wrote in message
...
Let say in excel cell A1 and B1, I created a List using Data Validation,
and put in value 1,2,3,N/A

So that cell A1 and B1 each will have drop down list 1,2,3, N/A

Now, How can I achieve following with formula:

- If in cell A1, after I select value 2 for example, it will check if B1
has select the same value 3,

Pseudocode is like this:
If B1 is empty or B1 has N/A,
write value 2 that selected into Cell C1

else If B1 has the same value as A1( in this example: 2)
it will prompt error, saying that value 2 has been
selected in another cell.and user has to select other value in cell A1

else
Compare the value with cell B1.
if B1 value < A1 Value
write B1 value into Cell C1
else
write A1 value (which is 2) into Cell C1
end if
end if

same check goes to Cell B1


Please help.





All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com