It's a long-winded title, but here's what I'm looking to do:
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[/TR]
[TR]
[TD="align: center"]Prod[/TD]
[TD="align: center"]MH[/TD]
[TD="align: center"]Rate[/TD]
[TD="align: center"]Total[/TD]
[TD="align: center"]Unit Price[/TD]
[TD="align: center"]Total[/TD]
[/TR]
[TR]
[TD="align: center"]0.5[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]CPT[/TD]
[TD="align: center"]=A3*B3*C3[/TD]
[TD="align: center"]CPT[/TD]
[TD="align: center"]=A3*E3[/TD]
[/TR]
</tbody>[/TABLE]
The formulas in D and F need to INTERPRET CPT in Column "C" as 17, and CPT in Column E as 25, but not CHANGE the CPT into the number, as in, I don't want it looking like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[/TR]
[TR]
[TD="align: center"]Prod[/TD]
[TD="align: center"]MH[/TD]
[TD="align: center"]Rate[/TD]
[TD="align: center"]Total[/TD]
[TD="align: center"]Unit Price[/TD]
[TD="align: center"]Total[/TD]
[/TR]
[TR]
[TD="align: center"]0.5[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]=A3*B3*C3[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]=A3*E3
[/TD]
[/TR]
</tbody>[/TABLE]
Is this possible? I have a slew of data I need to be able to refer to and reference differently depending on the columns they appear in, so I can't simply set the values to static numbers, and I need to be able to plug different "Codes" into columns C and E, otherwise I would simply set the formula to multiply by the Variable.
- I want to set specific text strings to a number, such as CPT is 17 if CPT is in column C, 25 in column E, etc.
- Users should be able to go through the sheet and type in "CPT", where vba will check the column CPT appears in, and then treat CPT as a corresponding number. For instance,
[TABLE="width: 500"]<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[/TR]
[TR]
[TD="align: center"]Prod[/TD]
[TD="align: center"]MH[/TD]
[TD="align: center"]Rate[/TD]
[TD="align: center"]Total[/TD]
[TD="align: center"]Unit Price[/TD]
[TD="align: center"]Total[/TD]
[/TR]
[TR]
[TD="align: center"]0.5[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]CPT[/TD]
[TD="align: center"]=A3*B3*C3[/TD]
[TD="align: center"]CPT[/TD]
[TD="align: center"]=A3*E3[/TD]
[/TR]
</tbody>[/TABLE]
The formulas in D and F need to INTERPRET CPT in Column "C" as 17, and CPT in Column E as 25, but not CHANGE the CPT into the number, as in, I don't want it looking like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[/TR]
[TR]
[TD="align: center"]Prod[/TD]
[TD="align: center"]MH[/TD]
[TD="align: center"]Rate[/TD]
[TD="align: center"]Total[/TD]
[TD="align: center"]Unit Price[/TD]
[TD="align: center"]Total[/TD]
[/TR]
[TR]
[TD="align: center"]0.5[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]=A3*B3*C3[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]=A3*E3
[/TD]
[/TR]
</tbody>[/TABLE]
Is this possible? I have a slew of data I need to be able to refer to and reference differently depending on the columns they appear in, so I can't simply set the values to static numbers, and I need to be able to plug different "Codes" into columns C and E, otherwise I would simply set the formula to multiply by the Variable.