View Single Post
  #1   Report Post  
bhargavsiva bhargavsiva is offline
Junior Member
 
Posts: 1
Default macro for calculate and compare

dear friends,
i need one macro for the following calculation.

my sheet1 has daily values in rows for each day.
it has about 100 columns
my sheet 2, row 1 has the Factor values for sheet1 columns
and row 2 has acceptable values for calculated result.
my sheet3 has the results

calculation

x=sheet1!(a2-a1)*sheet2!$a1
if (x < sheet2!$a3,error,y=x)

sheet3!a2=y

row numbers will be changed according to date.

i have to enter daily values in sheet1
i have to calculate the daily results
unexpectedly the whole values will be disturbed.
i want to run thro macro.

please help me.