Aretradeser
Board Regular
- Joined
- Jan 16, 2013
- Messages
- 176
- Office Version
- 2013
- Platform
- Windows
I have some data in an Excel sheet (sheet1), in column 2, name records; and, from column 3 to 14, the months of the year with number records.
On sheet2, from column 10 to 21, in row 4, the following formula:
which detects which name has a zero and records it where that match exists.
The problem occurs when there is more than one name with zero records, it only records the first one it finds, not the rest.
Example:
On sheet2, column10, row3, in January, it only records name10, when names12 and 13, 17, 18, 20 and 22 also meet this criterion. If I drag the formula down, it still records name10. and so it happens with all months.
Could this be solved with lines of code that would register all the names that meet this condition (zero registration)?
Thanks
On sheet2, from column 10 to 21, in row 4, the following formula:
Excel Formula:
INDICE(Sheet1!$B$3:$N$25;COINCIDIR(0;Sheet1!$C$3:$C$25;0);1)
The problem occurs when there is more than one name with zero records, it only records the first one it finds, not the rest.
Example:
On sheet2, column10, row3, in January, it only records name10, when names12 and 13, 17, 18, 20 and 22 also meet this criterion. If I drag the formula down, it still records name10. and so it happens with all months.
Could this be solved with lines of code that would register all the names that meet this condition (zero registration)?
Thanks
Libro1 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | J | K | L | M | N | |||
2 | NAMES | JAN | FEB | MAR | APR | MAY | JUN | JUL | AUG | SEP | OCT | NOV | DEC | ||
3 | Name1 | 2 | 3 | 0 | 3 | 5 | 7 | 1 | 0 | 2 | 3 | 0 | 10 | ||
4 | Name2 | 2 | 2 | 10 | 6 | 14 | 0 | 12 | 3 | 0 | 0 | 9 | 10 | ||
5 | Name3 | 2 | 4 | 5 | 6 | 0 | 4 | 0 | 10 | 6 | 2 | 4 | 0 | ||
6 | Name4 | 2 | 1 | 4 | 1 | 1 | 14 | 8 | 7 | 13 | 0 | 6 | 0 | ||
7 | Name5 | 2 | 2 | 7 | 3 | 6 | 11 | 4 | 0 | 14 | 14 | 1 | 14 | ||
8 | Name6 | 1 | 3 | 5 | 7 | 3 | 14 | 0 | 0 | 11 | 14 | 0 | 4 | ||
9 | Name7 | 2 | 2 | 7 | 8 | 10 | 12 | 1 | 12 | 0 | 5 | 13 | 8 | ||
10 | Name8 | 2 | 3 | 3 | 0 | 4 | 0 | 1 | 4 | 6 | 0 | 0 | 0 | ||
11 | Name9 | 2 | 4 | 0 | 0 | 13 | 11 | 9 | 9 | 10 | 3 | 9 | 5 | ||
12 | Name10 | 0 | 4 | 3 | 10 | 10 | 0 | 13 | 1 | 8 | 9 | 9 | 3 | ||
13 | Name11 | 2 | 0 | 5 | 0 | 6 | 8 | 0 | 0 | 8 | 5 | 3 | 4 | ||
14 | Name12 | 0 | 2 | 3 | 1 | 3 | 10 | 8 | 13 | 6 | 7 | 10 | 0 | ||
15 | Name13 | 0 | 1 | 9 | 7 | 14 | 12 | 10 | 0 | 6 | 7 | 0 | 4 | ||
16 | Name14 | 1 | 0 | 4 | 9 | 0 | 13 | 0 | 5 | 0 | 0 | 2 | 4 | ||
17 | Name15 | 1 | 0 | 9 | 7 | 13 | 0 | 0 | 12 | 10 | 13 | 0 | 3 | ||
18 | Name16 | 2 | 3 | 8 | 9 | 11 | 6 | 1 | 0 | 0 | 10 | 0 | 0 | ||
19 | Name17 | 0 | 9 | 0 | 1 | 9 | 12 | 11 | 14 | 7 | 12 | 0 | 0 | ||
20 | Name18 | 0 | 5 | 9 | 4 | 7 | 10 | 4 | 3 | 11 | 4 | 9 | 13 | ||
21 | Name19 | 1 | 0 | 0 | 5 | 4 | 7 | 7 | 0 | 0 | 0 | 0 | 1 | ||
22 | Name20 | 0 | 6 | 1 | 2 | 11 | 3 | 0 | 3 | 2 | 11 | 3 | 5 | ||
23 | Name21 | 6 | 2 | 1 | 7 | 0 | 6 | 6 | 0 | 1 | 0 | 0 | 8 | ||
24 | Name22 | 0 | 6 | 7 | 8 | 10 | 0 | 0 | 1 | 0 | 0 | 3 | 7 | ||
25 | Name23 | 2 | 8 | 1 | 3 | 5 | 3 | 4 | 10 | 7 | 0 | 10 | 0 | ||
Hoja1 |
Libro1 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
J | K | L | M | N | O | P | Q | R | S | T | U | |||
3 | JAN | FEB | MAR | APR | MAY | JUN | JUL | AUG | SEP | OCT | NOV | DEC | ||
4 | Name10 | Name11 | Name1 | Name8 | Name3 | Name2 | Name3 | Name1 | Name2 | Name2 | Name1 | Name3 | ||
5 | Name10 | |||||||||||||
6 | Name10 | |||||||||||||
7 | Name10 | |||||||||||||
8 | ||||||||||||||
Hoja2 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
K4:U4 | K4 | =INDEX(Hoja1!$B$3:$N$25,MATCH(0,Hoja1!D3:D25,0),1) |
J4:J7 | J4 | =INDEX(Hoja1!$B$3:$N$25,MATCH(0,Hoja1!$C$3:$C$25,0),1) |