ForceofWill
New Member
- Joined
- Dec 3, 2021
- Messages
- 2
- Office Version
- 2016
- Platform
- Windows
Enviar al foro.xlsm | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
47 | C1 | C2 | C3 | C4 | ||||||||||
48 | 1 | |||||||||||||
49 | 2 | |||||||||||||
50 | 3 | |||||||||||||
51 | ||||||||||||||
52 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | ||||||
53 | 1 | dog | cat | bird | fish | dog+ | cat+ | bird+ | fish+ | |||||
54 | 2 | tomato | carrot | corn | potato | |||||||||
55 | 3 | apple | pear | grape | orange | apple+ | ||||||||
Prueba para post |
I'm new to excel. I'm just learning how use formulas and also learning how use VBA. Thanks to this forum i learned a few things, but I'm still lack of some basics. I'm not an english speaker so i will try my best to expose what i want to do. What i want to do is Buttons for the second table. For example, a button for dog. When I click dog, it need to check the first table in the row 1, c1 (in this case E48) and if the is nothing in there put the value 1. If that row have a value, check if the c2 (F48) have a value , if not put 1. Keep doing that until row 1, c4 (H48). If i click the button cat, is will check the table 1, in the same row as dog, but instead of change the value to 1, it will change it for 2.
For example if I click, dog, cat cat dog the table 1 will look like this
Enviar al foro.xlsm | |||||||
---|---|---|---|---|---|---|---|
D | E | F | G | H | |||
47 | C1 | C2 | C3 | C4 | |||
48 | 1 | 1 | 2 | 2 | 1 | ||
49 | 2 | ||||||
50 | 3 | ||||||
Prueba para post |
This also happens with other combinations with table 2. But if the buttom is in row 2 of table 2, need to check for the row 2 in table 1.
Example: if i click this in order Corn, potato, tomato, carrot it should show
Enviar al foro.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
D | E | F | G | H | I | |||
47 | C1 | C2 | C3 | C4 | ||||
48 | 1 | |||||||
49 | 2 | 3 | 4 | 1 | 2 | |||
50 | 3 | |||||||
Prueba para post |
So if i click for example this other, apple, orange, apple+, tomato, carrot, fish, fish, the table should look like this
Enviar al foro.xlsm | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
47 | C1 | C2 | C3 | C4 | ||||||||||
48 | 1 | 4 | 4 | |||||||||||
49 | 2 | 1 | 2 | |||||||||||
50 | 3 | 1 | 4 | 5 | ||||||||||
51 | ||||||||||||||
52 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | ||||||
53 | 1 | dog | cat | bird | fish | dog+ | cat+ | bird+ | fish+ | |||||
54 | 2 | tomato | carrot | corn | potato | |||||||||
55 | 3 | apple | pear | grape | orange | apple+ | ||||||||
Prueba para post |
Also, don't want to be the cells, for example E48 (is row 1, c1 in the table one) be selected by E48. Want it to be select for his position compared with the position of table 2. For example for dog, E48 is a -5 row - 1 column. So when I check if cell is empty, it should check by his position, instead of the value E48 (this is because if i insert cells above, I will need to fix all the vba codes again). I Think i Only need, help of how make one or two macros for the buttons, and i will fill the others manually based on the answer.
Last edited by a moderator: