I am trying to use VBA to automatically take a cell formula and convert it to a string that can be used in VBA to place the formula in a cell.
Sorry for my poor explanation.
Basically I want to make a simple tool that someone could type in a formula into a cell, use VBA to convert it to a codified version of the formula.
For example: =IF(OR(A4=1,A5= 1),"Wired",IF(OR(A8= 1,A9=1),"Wireless"," "))
The VBA code for this would be to place in a cell would be: Sheets(1).Range("A1").formula = "=IF(OR(A4=1,A5=1)," & Chr(34) & "Wired" & ",IF(OR(A8=1,A9=1)," & Chr(34) & "Wireless" & Chr(34) & "," & Chr(34) & Chr(34) & "))"
I am trying to convert the former to the latter example automatically with VBA in Excel. I am going crazy trying to get it to work.
Anyone have any ideas on how to get it to work?
Sorry for my poor explanation.
Basically I want to make a simple tool that someone could type in a formula into a cell, use VBA to convert it to a codified version of the formula.
For example: =IF(OR(A4=1,A5= 1),"Wired",IF(OR(A8= 1,A9=1),"Wireless"," "))
The VBA code for this would be to place in a cell would be: Sheets(1).Range("A1").formula = "=IF(OR(A4=1,A5=1)," & Chr(34) & "Wired" & ",IF(OR(A8=1,A9=1)," & Chr(34) & "Wireless" & Chr(34) & "," & Chr(34) & Chr(34) & "))"
I am trying to convert the former to the latter example automatically with VBA in Excel. I am going crazy trying to get it to work.
Anyone have any ideas on how to get it to work?