Hello,
I've got a problem which I've tried solving with VBA, but have no idea how to tackle it.
Basically, I've got date column, value column and identificator column.
I need to find matches for 3 criteria:
2 dates i enter into specific cells (from - to) and identificators, which are constant strings (like OVP1, UNP1 - but doesnt matter because if there's no identificator in that row , i do not need it)
I would like to copy over whole rows with matching values to the other tab, each row in the last empty cell.
Data looks something like this:
tab "ALL"
<tbody>
</tbody>
So based on dates in cell A1 (from) and B1 (to), this would copy into the other tab, only rows with VALUE1, VALUE3
The other tab "VBA" would look like this after code execution:
A1= 01/01/2018 , B1= 03/01/2018
<tbody>
</tbody>
So only 2 rows with values matching would be copied over to "VBA" from "ALL" sheet. This depends on dates I input in A1, B1 sheet "VBA".
Im sure there has to be a loop and something like index/match?
Never done something like this in VBA before, any ideas how to handle this problem??
Thanks,
Matt.
I've got a problem which I've tried solving with VBA, but have no idea how to tackle it.
Basically, I've got date column, value column and identificator column.
I need to find matches for 3 criteria:
2 dates i enter into specific cells (from - to) and identificators, which are constant strings (like OVP1, UNP1 - but doesnt matter because if there's no identificator in that row , i do not need it)
I would like to copy over whole rows with matching values to the other tab, each row in the last empty cell.
Data looks something like this:
tab "ALL"
date | value | ID |
01/01/2018 | VALUE1 | OVP1 |
02/01/2018 | VALUE2 | |
02/01/2018 | VALUE3 | UNP1 |
03/01/2018 | VALUE4 | |
05/01/2018 | VALUE5 | ADM1 |
<tbody>
</tbody>
So based on dates in cell A1 (from) and B1 (to), this would copy into the other tab, only rows with VALUE1, VALUE3
The other tab "VBA" would look like this after code execution:
A1= 01/01/2018 , B1= 03/01/2018
date | value | ID |
01/01/2018 | VALUE1 | OVP1 |
02/01/2018 | VALUE3 | UNP1 |
<tbody>
</tbody>
So only 2 rows with values matching would be copied over to "VBA" from "ALL" sheet. This depends on dates I input in A1, B1 sheet "VBA".
Im sure there has to be a loop and something like index/match?
Never done something like this in VBA before, any ideas how to handle this problem??
Thanks,
Matt.