View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Akash Akash is offline
external usenet poster
 
Posts: 125
Default Rew Macro For Computation

On Feb 24, 6:08 pm, "merjet" wrote:
I changed the column references. The Sub is now:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Or Target.Column = 5 Or Target.Column = 6 Or
Target.Column = 8 Then
If Range("D" & Target.Row) < "" And Range("E" & Target.Row)
< "" And Range("F" & Target.Row) < "" And Range("H" & Target.Row) <
"" Then
Range("K" & Target.Row).FormulaR1C1 =
"=IF(ISBLANK(R8C4)=FALSE,RC[-7]*RC[-6]*RC[-5]/144*RC[-3])"
End If
End If
End Sub

R8C4 refers to row 8, column 4, i.e. D8. RC[-7] refers to the cell in
the same row and 7 columns left of column K. Similar for the others.

Hth,
Merjet



Dear Merjet,

Its not working...

Nothing is happening.

i tried but its not working

what should i do in this regards

I have following columns in my entire format


Sr No in A Column
Drg No in B Column
Prioject Name in C Column
FH is in D Column
FL is in E Column
RD is in F Column
FPI is in G column
QTY is in H Column
Type is in I Column
Area in J Column
COMPUTE IS IN K COLUMN
Analyze in L Column
Coil Type in M Column
Header Size in N Column
Weight in Kg in O Column
Total Weight in P Column
Ref No: in Q Column

Now i want that the below mentioned formulae in the Compute Column (K)

FH*FL*RD)/144*QTY

Whatever macro provided by you is not working in my seet. No error is
getting reflect.

I tried to added the macro provided by you i in Module 2.

But its not working.

What should i do in regard to above mentioned probs.

Awaiting for your reply as i had to start the work in the new format
as soon as possible.

Pls do help me in this regards

Thanks in Advance.

Akash