Thankyou all you guys for quick help.
I am now facing a strange problem.
The values in the sheet1 which I have named as 'parameters' are below (I am
not showing entire sheet here. It is pretty long
):
/NOPR
*SET BX1 -1.292927501624E-07
*SET BX2 -1.141633954439E-07
*SET BX3 -1.127943903568E-07
*SET BY1 4.467111249673E-08
*SET BY2 1.242211009761E-08
*SET BY3 2.058738127965E-09
*SET BZ1 9.958343153752E-08
*SET BZ2 6.274505098194E-09
*SET BZ3 -3.132556459805E-08
*SET CRACK 2.663850000000E-03
*SET CX1 -2.641880672886E-07
*SET CX2 -2.313901629704E-07
*SET CX3 -2.299511040808E-07
*SET CY1 8.692051321624E-08
*SET CY2 2.452136873548E-08
*SET CY3 3.358494300625E-09
*SET CZ1 1.881823140769E-07
*SET CZ2 1.150936825102E-08
*SET CZ3 -6.567685052698E-08
*SET DISCR 1.400000000000E-02
*SET DX1 -2.319996384970E-07
*SET DX2 -2.305784363904E-07
DX3 -2.275705711076E-07
*SET DX4 -2.311028533460E-07
*SET DX5 -2.284933228005E-07
*SET DY1 4.440036180011E-08
*SET DY2 2.057977463140E-08
*SET DY3 -5.875278474995E-09
*SET DY4 2.851123741177E-08
*SET DY5 1.191354952814E-08
*SET DZ1 8.919140074728E-08
*SET DZ2 -5.337422745664E-09
*SET DZ3 -9.782311158106E-08
*SET DZ4 2.975426185995E-08
*SET DZ5 -3.997589395777E-08
This is the value I am getting on sheet2 using the formula
=IF(ISNA(MATCH(A1,parameters!B:B,1)),"",OFFSET(parameters!$C$1,MATCH(A1,para
meters!B:B,1),0))
When I drag this formula down in column I get all the values correctly but
the first value doesn't show!
I have used the same formula in other sheets to extract the value from
"parameters" sheet. But strangely I am unable to get BX1.
BX1
BY1 4.467111249673E-08
BZ1 9.958343153752E-08
CX1 -2.641880672886E-07
CY1 8.692051321624E-08
CZ1 1.881823140769E-07
DX1 -2.319996384970E-07
DY1 4.440036180011E-08
DZ1 8.919140074728E-08
Any idea why am I getting blank value even if there is a match available!
thanks
Agrawal.
Max said:
One way:
Assume you have
in Sheet1, in B2:C4,
the sample data:
Code Val
hop1 80
elm1 200
skip1 70
In Sheet2
-----------
Suppose you have in col A,
data in A2 down as follows:
Code
elm1
hop1
skip1
etc
Put in B2:
=IF(ISNA(MATCH(TRIM(A2),Sheet1!B:B,0)),"",OFFSET(Sheet1!$C$1,MATCH(TRIM(A2),
Sheet1!B:B,0)-1,0))
Copy B2 down col B
Col B will extract the corresponding values from col C of Sheet1
for matching items listed in col A
Non-matching items listed in col A will return blanks [""] in col B
--
Rgds
Max
xl 97
--
Please respond, in newsgroup
xdemechanik <at>yahoo<dot>com
---
Agrawal said:
Hi,
I want to get some values from sheet1 to sheet2.
The conditions are:
Get the value from sheet1 to 'column A in sheet2' (or any other column).
If Column B in sheet1 has this element say "elm1", then get the value (which
is a numerical value, say "200") from the column "C" in the same row
in
the
same sheet1.
How to do it? I am really new as I have never done any VBA programming
before. But as I came across this problem, I realized there is no escape
from it.
I hope I am clear in stating the problem here. If not please let me know.
Thanks,
Srikant.