Hello there, I am a newbie. I am a good excel user but not a good VBA or any language writer/programmer.
I want to create a VB script so that the below when entered into the cell on the same row, if it already exists to highlight this and a pop up warning if possible, to either accept and continue so it highlights or to have the option of not accepting the entry? Is this possible?
So on row 5 where Orange has been entered for a 2nd time, this is when I would like the VB to kick in, it could be on any row and any column? I use a data validation list view on each cell from the cells B20:B30 - can obviously vary, smaller or longer.
This is the mini sheet for you to help with;
I want to create a VB script so that the below when entered into the cell on the same row, if it already exists to highlight this and a pop up warning if possible, to either accept and continue so it highlights or to have the option of not accepting the entry? Is this possible?
So on row 5 where Orange has been entered for a 2nd time, this is when I would like the VB to kick in, it could be on any row and any column? I use a data validation list view on each cell from the cells B20:B30 - can obviously vary, smaller or longer.
This is the mini sheet for you to help with;
Book1.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Test | 21/04/2023 | 25/04/2023 | 29/04/2023 | ||
2 | ||||||
3 | 7 | 7 | 7 | 1 | ||
4 | Name | Week 1 | Week 2 | Week 3 | ||
5 | A | White | Orange | Orange | ||
6 | B | Orange | Blue | |||
7 | C | Yellow | Red | |||
8 | D | Blue | Black | |||
9 | E | Red | Black | |||
10 | F | Purple | Pink | |||
11 | G | Black | Yellow | |||
12 | ||||||
13 | ||||||
14 | ||||||
15 | ||||||
16 | ||||||
17 | ||||||
18 | ||||||
19 | ||||||
20 | White | |||||
21 | Orange | |||||
22 | Yellow | |||||
23 | Blue | |||||
24 | Red | |||||
25 | Purple | |||||
26 | Black | |||||
27 | Pink | |||||
28 | Green | |||||
29 | Violet | |||||
30 | Plum | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A3 | A3 | =COUNTA(A5:A21) |
B3:D3 | B3 | =COUNTA(B5:B11) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
A1:H11 | Expression | =ROW(A1)=CurrentRow | text | NO |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
B5:D11 | List | =$B$20:$B$30 |