LTspice (XVII) Use component instance name as a parameter
I hope I didn't get this wrong. When you create your subcircuit, write the value as {R1}, and in the symbol attributes, add R1=.... This way, when you place your symbol, you can change the value however you want (tables included). If you don't work with symbols (directly with SPICE directives as .subckt), then add a line in your subcitcuit defining the parameter: .param R1=.... Remember, though, that this needs to be done for all the subcircuits you place. For example:

.subckt Bla 1 2
.param R1=... ; this line is optional, but it can serve as a fallback value
R1 1 2 {R1}
.ends Bla


In the first placed symbol, you can add R1=3, in the 2nd R1=5, etc.

If you want external control through other .param statements, directly from your schematic, then you can use R1={R1_1} for the 1st symbol, R1={R1_2} for the 2nd, and so on (or whichever code you wish), and in the schematic you'll have something like .param R1_1=... R1_2=..., or you can make a function to encompass all the values, something like this:

.func res(x) {table(x, 1, 1k, 2, exp(-2), 3, sqrt(3), ...)}  ; or some other function:
.func res(x) {cosh(x)}


Then, you can write: R1={res(1)} for the 1st symbol, R1={res(2)} for the 2nd, etc, and depending on the definition in the .func, each resistor will have a value assigned. This function is used in the top schematic.



One way to cheat would be to use a spreadsheet, making use of =""&amp;&lt;expression&gt;&amp;"". Here's an example:

="C"&amp;$A1&amp;"b "&amp;$A1&amp;" 0 {"&amp;$A1&amp;"/w} Rpar={Rpar}"

while the A column has sequential numbers. This will generate these lines:

C1b 1 0 {1/w} Rpar={Rpar}
C2b 2 0 {2/w} Rpar={Rpar}
C3b 3 0 {3/w} Rpar={Rpar}
C4b 4 0 {4/w} Rpar={Rpar}


The values for the capacitance can be calculated using your favourite mathematical expression (I used a simple sequential numbering). For constant values, a simple {Rpar} was used.

This means you will no longer place symbols, manually, but add a SPICE directive (S key) and insert these lines. Any subsequent additions/subtractions from the list means a simple generating lines and a copy-paste, or deletion of lines.



The way the above works is to define the generic SPICE element as:

&lt;Designator&gt; &lt;pin1&gt; &lt;pin2&gt; ... &lt;pinN&gt; &lt;Name&gt; &lt;Attributes&gt;

For the case above, it's a capacitor, so it has the designated letter C, followed by the numbered instance in the schematic, two pins, its value (known to be in pF), and optional attributes such as parasitics (Rser used, but also Rpar, Lser, etc) and temperature coefficient (not used). It does not have a name since it's a primitive element, the designator automatically says that it's a capacitor. The LTspice manual has more about these in LTspice &gt; Circuit Elements.

Subcircuits have their special designator, X, and the number of pins is as many as the subcircuit is made with. The name here is mandatory, as it is used to know what the subcircuit is called. The attributes are optional and are usually the parameters.

Looking at the example in the LTspice's manual, the subcircuit is defined as a resistive divider, so it has three pins. It is connected between nodes in, out, and 0 (which is recognized as ground), the name is divider, and optional attributes are its two parameters: top and bot.

Using SPICE directives to write elements can be a convenient way for an iterative process, for example (such as this case), but it can prove a bit cumbersome in case of probing voltages from within the schematic's GUI. A solution is to simply draw bits of nets and label them accordingly, ready for probing.