Forum Discussion
Formatting depending upon results form a vstack
I have a dynamic VSTACK being displayed. I want to format an adjacent cell in each line of the VSTACK with a boarder that appears or disappears according to changing number of rows in the VSTACK.
I would appreciate any help in achieving this.
5 Replies
- JKPieterseSilver Contributor
Have you considered my free Spill Manager add-in?
- TerioBrass Contributor
The-WOD wrote:
I want to format an adjacent cell in each line of the VSTACK with a boarder that appears or disappears according to changing number of rows
I would try by verifying that the row number falls within the range returned by the formula.
For example, if the formula is in cell A1, you could try:
=ROW(A1)<=MAX(ROW($A$1#))applied at first column adiacent the VSTACK results. Otherwise, if you have a formula below the first, you must check also the row ≥ the MIN value.
Bye. - SynthiaHongBrass Contributor
You could try applying conditional formatting to the output range of the VSTACK formula. Since VSTACK returns a dynamic array, make sure the formatting rules cover the entire spill range, and use a formula based on the result you want to highlight. This should let the formatting update automatically as the stacked data changes.
- Olufemi7Steel Contributor
Hello The-WOD,
You can use Conditional Formatting to show a border beside each row returned by your VSTACK formula.Select the adjacent cells you want to format. Go to Home > Conditional Formatting > New Rule and choose the option to use a formula.
If your VSTACK results start in A2, use:
=A2<>""
Choose Format, then Border, and select the border you want. Set Applies to the adjacent cell range you want to format.
The border will appear when the corresponding cell in column A is not blank and disappear when it becomes blank.
If your VSTACK returns empty strings or includes blank rows, the rule may need to be adjusted. Sharing your VSTACK formula and the locations of the results and adjacent cells would help identify the correct formula.