View Single Post
  #4   Report Post  
Ian
 
Posts: n/a
Default

=IF(C1="P",VLOOKUP(D1,Sheet2!A2:C8,2),IF(C1="S",VL OOKUP(D1,Sheet2!A2:C8,3),""))

Change Sheet1 & Sheet2 to suit your sheet names. Returns blank cell if C1 is
not P or S. I've assumed the data on sheet 2 is in columns A:C with the
header in row 1, data staring in row 2.

The first column in your data table needs to be in ascending alphanumeric
order.

--
Ian
--
"nowfal" wrote in
message ...

Hi,
In the second sheet i have a table as follows:
CURRENCY / PURCHASE/ SALE
USD ---- 384 ----- 386
GBP ------ 685------- 700
EUR----------- 480-------490
INR-----------8 ----------9
THB----------9 ----------10
AED-------104-----------105
SAR-------102-----------103

In the first sheet I have 6 colomns, In the third("C") colomn i have 2
options either PURCHASE(P) or SALE (S) , and the next colomn (D) user
will put currency name like USD or GBP. Now i wanted to fill
automatically the respected rates in the colomn(E)
ie. If C colomn is P(purchase) and D colomn is USD and i have to get E
colomn as 384. Any solution?
thanks and regards
by
NOWFAL


--
nowfal
------------------------------------------------------------------------
nowfal's Profile:
http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=399926