Range("B3").Select
Windows("Book3").Activate
Range("B3").Select
ActiveCell.FormulaR1C1 = _
"=IF(R[-2]C=""AuftrAG"",""Actual Phase"",IF(R[-2]C=""dwtst01"",""Testing Variable 1"",IF(R[-2]C=""dwtst02"",""Testing Variable 2"",IF(R[-2]C=""dwtst03"",""Testing Variable 3"",IF(R[-2]C=""dwtst04"",""Testing Variable 4"",IF(R[-2]C=""ejector_pos"",""Ejector Position"",IF(R[-2]C=""faz"",""Force Main Cylinder"",IF(R[-2]C=""fez"",""Force Actuator Cylinder"",IF(R[-2]C=""f"& _
"""Net Pressing Force"",IF(R[-2]C=""fvez"",""Velocity Feedback"",IF(R[-2]C=""pakku"",""Akku Pressure"",IF(R[-2]C=""p_qaz"",""Multiplier From Working Cylinder"",IF(R[-2]C=""p_qez"",""Multiplier From Actuator Cylinder"",IF(R[-2]C=""sez"",""Position Ram"",IF(R[-2]C=""Vac_P_Sys"",""Vacuum System Pressure"",IF(R[-2]C=""Vac_P_Tool"",""Actual Valve Value Positioning WC2"",I"& _
"""vez"",""Speed Ram"",IF(R[-2]C=""vfaz"",""Output Force Controller Main Cylinder"",IF(R[-2]C=""vfmin"",""Output Min-Force-Controller"",IF(R[-2]C=""vfvor"",""Force Pre Control"",IF(R[-2]C=""vsez"",""Output Position Controller High Speed"",IF(R[-2]C=""w3vez"",""Input Precontrol Table High Speed"",IF(R[-2]C=""wfaz"",""Set Value Force Main Cylinder"",IF(R[-2]C=""wfez"","& _
"ue Force Velocity Cylinder"",IF(R[-2]C=""wsez"",""Set Value Position"",IF(R[-2]C=""wsp"",""Set Value Position Parallel Motion"",IF(R[-2]C=""wvaz1"",""Set Value Velocity"",IF(R[-2]C=""wvez"",""Set Value Velocity of the Ram"",IF(R[-2]C=""wvez_vor"",""Input Precontrol Table High Speed"",IF(R[-2]C=""wWzTmpT01"",""Set Value Temperature Table 1"",IF(R[-2]C=""wWzTmpT02"",""& _
"e Temperature Table 2"",IF(R[-2]C=""xp_Tool[1]"",""Tool Pressure Load Cell #1"",IF(R[-2]C=""xp_Tool[2]"",""Tool Pressure Load Cell #2"",IF(R[-2]C=""xp_Tool[3]"",""Tool Pressure Load Cell #3"",IF(R[-2]C=""xp_Tool[4]"",""Tool Pressure Load Cell #4"",IF(R[-2]C=""xp_Tool[5]"",""Tool Pressure Load Cell #5"",IF(R[-2]C=""xp_Tool[6]"",""Tool Pressure Load Cell #6"",IF(R[-2]"& _
"ol[1]"",""Tool LVDT #1"",IF(R[-2]C=""xs_Tool[2]"",""Tool LVDT #2"",IF(R[-2]C=""xs_Tool[3]"",""Tool LVDT #3"",IF(R[-2]C=""xs_Tool[4]"",""Tool LVDT #4"",IF(R[-2]C=""xWzTmpS01"",""Actual Value Temp Ram 1"",IF(R[-2]C=""xWzTmpS02"",""Actual Value Temp Ram 2"",IF(R[-2]C=""xWzTmpS03"",""Actual Value Temp Ram 3"",IF(R[-2]C=""xWzTmpS04"",""Actual Value Temp Ram 4"",IF(R[-2]C"& _
"S05"",""Actual Value Temp Ram 5"",IF(R[-2]C=""xWzTmpS06"",""Actual Value Temp Ram 6"",IF(R[-2]C=""xWzTmpS07"",""Actual Value Temp Ram 7"",IF(R[-2]C=""xWzTmpS08"",""Actual Value Temp Ram 8"",IF(R[-2]C=""xWzTmpS09"",""Actual Value Temp Ram 9"",IF(R[-2]C=""xWzTmpS10"",""Actual Value Temp Ram 10"",IF(R[-2]C=""xWzTmpS11"",""Actual Value Temp Ram 11"",IF(R[-2]C=""xWzTmpS1"& _
"ual Value Temp Ram 12"",IF(R[-2]C=""xWzTmp T01"",""Actual Value Temp Table 1"",IF(R[-2]C=""xWzTmp T02"",""Actual Value Temp Table 2"",IF(R[-2]C=""y205u"",""Output Voltage H1T"",IF(R[-2]C=""y205wPro"",""Set Value Velocity H1T"",IF(R[-2]C=""y210u"",""Output Voltage H1T"",IF(R[-2]C=""y210wp"",""Set Pressure H1T"",IF(R[-2]C=""y4"",""Set Value Valve Pressure hp-accu"",IF"& _
""yaz"",""Set Value Valve Working Cylinder"",IF(R[-2]C=""yaz1_1"",""Set Value Valve Working Cylinder Y1.1"",IF(R[-2]C=""yazIst1_1"",""Actual Value Valve 21-Y1.1"",IF(R[-2]C=""yez"",""Set Value Valve Actuator Cylinder"",IF(R[-2]C=""yezlst"",""Actual Value Valve 21-Y3.1"")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))""& _
"ate
Range("B3").Select
Selection.AutoFill Destination:=Range("B3:BN3"), Type:=xlFillDefault
Range("B3:BN3").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
This is the code, i tried breaking it down to 4 macros but didnt work.
What I am trying to do is this:
I have a press that outputs data for me. It gives the column headings in a code, I need to apply something that decodes what it says.
There can be different selections for what columns are what one time, and change the order next time. I need to have every possible decoder in all the cells.
Is there a better way to do this?
Thanks<!-- / message -->