I use this :
=SUMPRODUCT((A4:AF4=1)*10+(A4:AF4=2)*4+(A4:AF4=3)*3)
This works perfect.
Thanks for the feedback.
Question:
If i put this formula into AG field, output will be in this field.
What do i need to do if i want to insert formula into field AH and if i
want to see the result in AG.
Basically, i want to put formula in one field but display the result in
other.
That is not how Excel works. If you put a formula into AG1 (e.g.),
you will see the result in AG1.
You can __also__ get the result in AH2 (e.g.) by simply entering the
formula =AG1.
And you can hide the result in AG1 either by hiding the column or row,
or by selecting a font color that is the same as the background color.
But why not simply put the formula into AH2 in the first place? What
is that you are really trying to accomplish?
If you want to display the formula that produces the result, there are
ways to accomplish that.
I would put the formula into AH2. Then in AG1 I would put the formula
=myFormula(AH2), where myFormula is a UDF (VBA code) like the
following:
Function myFormula(r As Range) As String
myFormula = r.Formula
End Function
To create the UDF, in the Excel window, press alt+F11 to open the VBA
window. In the VBA window, click Insert > Module to open the VBA
editing pane. Copy the text above and paste into the VBA editing
pane. You can now close the VBA window.