SUSAN BAXTER
New Member
- Joined
- Apr 1, 2019
- Messages
- 47
Hi
I was looking for help to create some data block code. Whats really important is the ability to add more data blocks (anywhere on my sheet) over time and that's why I have chosen data blocks (hope I’m correct). I have found some code and could include it in the post if that will save some time, please advise.
I have two sets of data blocks as an example:
1stset is B6 to E17 (so 4 columns over and 12 rows down), column B is formatted as text and C/D/E is formatted as numbers. The second data block, is where the data source is located in a true event and are located at cells N6 to P17 (so only 3 columns over and 12 rows down), columns C/D/E are formatted as numbers.
2nd set is H6 to K10 (so 4 columns over and 4 rows down), column H is formatted as text and I/J/K is formatted as numbers. The second data block, is where the data source is located in a true event and are located in a true event and are located at cells N22 to P25 (so 3 columns over and 4 rows down), columns I/J/K are formatted as numbers.
The code would search the range B6:B12,H6:H10 for any sets (9-9, 11-1, 1-1 etc.) of numbers. As an example it finds 9-3 in cell B8 which would be a true result. The code would then (I’m sure how to write this up so please advise if it’s not clear) would have to determine that the true result was on the 3rd row down and search the data block N6:P17 to find the third row down which would be N8 and write the numbers to cells C8, O8 and write the numbers to cells D8, P8 and write the numbers to cells E8. The code would continue with the rest of the range to find any other true events and if none end.
Thanks so much for any help/advice.
<style type="text/css">p { margin-bottom: 0.25cm; direction: ltr; color: rgb(0, 0, 0); line-height: 115%; text-align: left; }p.western { font-family: "Liberation Serif", serif; font-size: 12pt; }p.cjk { font-family: "WenQuanYi Micro Hei"; font-size: 12pt; }p.ctl { font-family: "Lohit Devanagari"; font-size: 12pt; }a:link { }</style>
I was looking for help to create some data block code. Whats really important is the ability to add more data blocks (anywhere on my sheet) over time and that's why I have chosen data blocks (hope I’m correct). I have found some code and could include it in the post if that will save some time, please advise.
I have two sets of data blocks as an example:
1stset is B6 to E17 (so 4 columns over and 12 rows down), column B is formatted as text and C/D/E is formatted as numbers. The second data block, is where the data source is located in a true event and are located at cells N6 to P17 (so only 3 columns over and 12 rows down), columns C/D/E are formatted as numbers.
2nd set is H6 to K10 (so 4 columns over and 4 rows down), column H is formatted as text and I/J/K is formatted as numbers. The second data block, is where the data source is located in a true event and are located in a true event and are located at cells N22 to P25 (so 3 columns over and 4 rows down), columns I/J/K are formatted as numbers.
The code would search the range B6:B12,H6:H10 for any sets (9-9, 11-1, 1-1 etc.) of numbers. As an example it finds 9-3 in cell B8 which would be a true result. The code would then (I’m sure how to write this up so please advise if it’s not clear) would have to determine that the true result was on the 3rd row down and search the data block N6:P17 to find the third row down which would be N8 and write the numbers to cells C8, O8 and write the numbers to cells D8, P8 and write the numbers to cells E8. The code would continue with the rest of the range to find any other true events and if none end.
Thanks so much for any help/advice.
<style type="text/css">p { margin-bottom: 0.25cm; direction: ltr; color: rgb(0, 0, 0); line-height: 115%; text-align: left; }p.western { font-family: "Liberation Serif", serif; font-size: 12pt; }p.cjk { font-family: "WenQuanYi Micro Hei"; font-size: 12pt; }p.ctl { font-family: "Lohit Devanagari"; font-size: 12pt; }a:link { }</style>