E
Eddy Stan
Hi
Question 1
' the below line works
Set rng = sh2.Range(sh2.Cells(4, 2), sh2.Cells(Rows.Count, 1).End(xlUp))
' but how can i allot the data in range name "DSOCML" in to Set rng
' Can i substitute the above line like below line (now it gives error)
' Set rng = Range.Name("DSOCML").Value
Question 2
For Each cell In rng
If cell.Offset(0, 1) = Customer_lookfor then
' the above 2 lines looks for all cells in the range "DSOCML" for customer
code, so if it finds anywhere, that data is brought in, which is wrong. I
want to bring only if the customer lookfor is found in first column
Question 3
do we have to initialise zero like below
tsum = 0
xsum = 0
ysum = 0
cant we store like store 0 to tsum, xsum, ysum
Urgent folks, please help me
Question 1
' the below line works
Set rng = sh2.Range(sh2.Cells(4, 2), sh2.Cells(Rows.Count, 1).End(xlUp))
' but how can i allot the data in range name "DSOCML" in to Set rng
' Can i substitute the above line like below line (now it gives error)
' Set rng = Range.Name("DSOCML").Value
Question 2
For Each cell In rng
If cell.Offset(0, 1) = Customer_lookfor then
' the above 2 lines looks for all cells in the range "DSOCML" for customer
code, so if it finds anywhere, that data is brought in, which is wrong. I
want to bring only if the customer lookfor is found in first column
Question 3
do we have to initialise zero like below
tsum = 0
xsum = 0
ysum = 0
cant we store like store 0 to tsum, xsum, ysum
Urgent folks, please help me