Adding data using formulas

In the Total price column of the table, we want to add the total price of the parts, which is the product of the part quantity and the unit price.

In the following example, we will use a formula that will allow us to multiply the value in column D by the value in column C, and the resulting value will be added to column E:

  1. Double-click on cell E3, which is right underneath the Total price cell, and then type =C3*D3.
  2. This string of characters is a formula, which begins with the = sign. C3*D3 indicates that we are multiplying the value in cell C3 by the value in cell D3.
  3. Once you are done typing this in cell E3, click outside the table and you will end up with 10 as the value inside cell E3. Here, the value inside cell C3 is 1, and when it is multiplied by the value inside cell D3, which is 10, the result is 10 x 1, or 10.
  4. Now, we can copy the same formula for other cells in column E. For that, select cell E3 and then click the diamond grip at the bottom right of the cell and drag it up to the cell E6, as shown in Figure 7.17.
  5. You will notice that the formula will be copied to all the selected cells of the table and it will be updated as per the values in the respective Unit Price and Quantity columns, as shown here:

Figure 7.17: Selecting the cell and copying its formula to other cells

All the values added in the Total price column will have a gray background, which indicates that this data is different from normal text. This is called a field in AutoCAD, which is dynamic text linked to some other features in the drawing; this field can change according to the data that is linked to it:

Figure 7.18: Formula added to the selected cells 

To see the field in action, double-click on cell C3 and change the quantity from 1 to 3, and you will notice that the value in cell E3 will update to 30 instead of 10, as 3 x 10 is 30. We will learn more about fields in the next section:

Figure 7.19: When changing the value in the numbered cell, its related field updates in the highlighted row 

The gray background of the field is visible only in the drawing area; when you plot your drawing, it will plot like normal text without any gray background. So, basically, we have a gray background in the drawing to distinguish simple text from fields.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.242.165