hsandeep
Well-known Member
- Joined
- Dec 6, 2008
- Messages
- 1,217
- Office Version
- 2010
- Platform
- Windows
- Mobile
My first source range is E25:J25, contiguous columns, generates either 1 or 0.
Second source range is E74:J88 generates numerical integers >=0
I need formulas for the third target range E72:J72 & fourth target range and E174:J188.
Third target range E72:J72: to fill the corresponding column cell of E72:J72 with 20 corresponding to the column in E25:J25 in which last occurrence of 1 is found. Example: E25:J25 {0, 1, 0, 0 1, 0} so last occurrence is in I25, hence I72 should be filled with 20.
All preceding columns in E72:J72 to this ‘identified’ column should be filled with 10. As per example considered: E72:H72 should be filled with 10.
And rest succeeding cells, if at all, should be filled with 0. So J72 should be filled with 0. So as per example, E72:J72 should be {10, 10, 10, 10, 20, 0}.
Note: If the last occurrence is in E25 then there would be zero numbers of preceding columns in E72:J72, so in this case E72:J72 should be {20, 0, 0, 0, 0, 0}. If E25:J25=0 then E72:J72 should be {0, 0, 0, 0, 0, 0}.
Filling of corresponding columns in E174:J188:
Fourth target range E174:J188: Corresponding to the column containing 20 in E72:J72, fill corresponding column of E174:J188 with same values of E74:J88.
Filling of preceding columns in E174:J188:
Match each cell’s value of each row of each preceding columns of E74:J88 (cell containing 10 in E72:J72) with the first row cell’s value of the ‘identified’ column in E74:J88. If the values match, fill this value in the corresponding cell of the corresponding preceding column in E174:J188 else match cell’s value of second row of this preceding column of E74:J88 (cell containing 10 in E72:J72) with the first row cell’s value of the ‘identified’ column in E74:J88 again. If they match, fill this value in the corresponding cell of the corresponding preceding column in E174:J188 & so on till 15th row unless values are matched. If no match is found, then fill the corresponding cell of the corresponding preceding column in E174:J188 with 0.
Repeat matching with the second row cell’s value of the ‘identified’ column in E74:J88 till 15th row cell’s value of the ‘identified’ column in E74:J88.
Repeat for each preceding columns.
Note: Cell value in each row is distinct within every column of E74:J88
How to accomplish?
Thanks in advance.
Second source range is E74:J88 generates numerical integers >=0
I need formulas for the third target range E72:J72 & fourth target range and E174:J188.
Third target range E72:J72: to fill the corresponding column cell of E72:J72 with 20 corresponding to the column in E25:J25 in which last occurrence of 1 is found. Example: E25:J25 {0, 1, 0, 0 1, 0} so last occurrence is in I25, hence I72 should be filled with 20.
All preceding columns in E72:J72 to this ‘identified’ column should be filled with 10. As per example considered: E72:H72 should be filled with 10.
And rest succeeding cells, if at all, should be filled with 0. So J72 should be filled with 0. So as per example, E72:J72 should be {10, 10, 10, 10, 20, 0}.
Note: If the last occurrence is in E25 then there would be zero numbers of preceding columns in E72:J72, so in this case E72:J72 should be {20, 0, 0, 0, 0, 0}. If E25:J25=0 then E72:J72 should be {0, 0, 0, 0, 0, 0}.
Filling of corresponding columns in E174:J188:
Fourth target range E174:J188: Corresponding to the column containing 20 in E72:J72, fill corresponding column of E174:J188 with same values of E74:J88.
Filling of preceding columns in E174:J188:
Match each cell’s value of each row of each preceding columns of E74:J88 (cell containing 10 in E72:J72) with the first row cell’s value of the ‘identified’ column in E74:J88. If the values match, fill this value in the corresponding cell of the corresponding preceding column in E174:J188 else match cell’s value of second row of this preceding column of E74:J88 (cell containing 10 in E72:J72) with the first row cell’s value of the ‘identified’ column in E74:J88 again. If they match, fill this value in the corresponding cell of the corresponding preceding column in E174:J188 & so on till 15th row unless values are matched. If no match is found, then fill the corresponding cell of the corresponding preceding column in E174:J188 with 0.
Repeat matching with the second row cell’s value of the ‘identified’ column in E74:J88 till 15th row cell’s value of the ‘identified’ column in E74:J88.
Repeat for each preceding columns.
Note: Cell value in each row is distinct within every column of E74:J88
How to accomplish?
Thanks in advance.