Create a table with a variable number of rows
Loude
Posted messages
11
Status
Member
-
spencer -
spencer -
Hello,
I would like to create a table where the number of rows is determined by the value of a cell. Thank you for any help.
Loude.
I would like to create a table where the number of rows is determined by the value of a cell. Thank you for any help.
Loude.
13 answers
-
Hello,
Regarding the color and borders of the cells, you need to check in the conditional formatting... starting from a formula (last line).
Then you define the cell that will serve as a reference. In the first table, I took D3 by giving it a semi-absolute address, which is =$D3<>"".
If the cell in D is not empty, then apply the format that is defined (yellow background and border).
To extend this formatting to the entirety of your table (columns D, E, F) and for the defined rows, use the third part "applies to", click on the square on the right and with the mouse select the area here from D3 to F364 in absolute address. Remember to Validate and click OK. You can always return to this conditional formatting with the "Edit Rule" command.
For your second question, since I don't know what you want to put in your tables, I can't answer you. You would need to post a file on the cijoint.fr site explaining what you want to achieve.
A+
pépé -
Hello,
Your question isn't very clear...
In Excel, for example, we can generate a number of rows based on a piece of information:
In A1, we enter the desired number of rows
In A3 (for example), we enter =IF(A1="","",1)
In A4 the formula: =IF(A3<$A$1,A3+1,"")
we copy this last formula down the entire column A
If A1 is empty, all the other cells will be empty
If A1 shows a number, the rows in column A will be numbered from 1 to the value entered in A1.
A+
pépé -
I'm going to try to be clearer, I am designing an Excel spreadsheet that will consist of several tables. The first table named "Data" contains a cell where the user will be asked to indicate the number of presses. Let's imagine 9. So in this cell, there will be 9.
My question is how to ensure that the second table has 9 rows while always having 2 columns? -
Hello,
I don't know if this will help you:
attached is an Excel file
http://www.cijoint.fr/cjlink.php?file=cj201106/cijSC3z3If.xls
Your question lacks information.
See you later
pépé -
Here is a slightly more elaborate table:
http://www.cijoint.fr/cjlink.php?file=cj201106/cijonHAfjk.xls
A+
grandpa -
Ok, thank you very much, what are the "" used for in if functions?
-
-
How do you make the color follow along the table? For example, when I increase the number of rows it works, but the color does not apply to the new rows.
-
Another, much more complex problem: how to adapt the formulas to the number of rows in Table 2?
-
-
I don't understand, in "select a rule" I put the last one, then I select what interests me, and it tells me:
"You cannot use direct references to a range of worksheet cells in a conditional formatting formula. Refer to a single cell or use a reference with a worksheet function such as =sum(A1,E5)" -
-