ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Defined Function - Needed (https://www.excelbanter.com/excel-programming/378922-re-user-defined-function-needed.html)

Norman Jones

User Defined Function - Needed
 
Hi Vadhimoo,

Instead of a UDF, try using Excel's VLookup function.

See Excel's help for details or see Debra Dalgleish at:

http://www.contextures.com/xlFunctions02.html


---
Regards,
Norman



"Vadhimoo" wrote in message
...
Hi ,

I am havinng two work books like:

Workbook1.Sheet1:

Date TransferID SupName Amount
10/20/2006 001 MCI 25000
11/11/2005 101 AT&T 50000
12/12/2006 301 Orange 35000
........... .... ...... .......
........... ..... ...... .......

Workbook2.Sheet1:

SupName SupNo
Tele2 2001
AT&T 3001
MCI 5001
Orange 6001
....... ......
....... .......


I need the UDF , result should be like this in the Workbook.Shee1:

Date TransferID SupName Amount SupNo
10/20/2006 001 MCI 25000 5001
11/11/2005 101 AT&T 50000 3001
12/12/2006 301 Orange 35000 6001
........... .... ...... .......
........
........... ..... ...... .......
.......





Norman Jones

User Defined Function - Needed
 
Hi Vadhimoo,

'---------------
Thanks for your immediate response.But i am not expert in VLOOKUp
function.Can you suggest the Vlookup formula for the below example?
'---------------

Try using Debra Dalgleish's VLookup tutorial which I suggested

http://www.contextures.com/xlFunctions02.html




---
Regards,
Norman



Norman Jones

User Defined Function - Needed
 
Hi Vadhimoo,

'---------------------
Try using Debra Dalgleish's VLookup tutorial which I suggested

http://www.contextures.com/xlFunctions02.html


'---------------------

I suggested the tutorial rather than suggesting a formula on the principle
that it is better to teach a man to fish than to offer him a single fish.

However, im order not to appear churlish, try the formula:

=VLOOKUP(C2,MyTable,2,0)

in cell E2 on sheet1; then copy/drag this formula down as far as required.

MyTable is a named range for the table on sheet2.


---
Regards,
Norman



Norman Jones

User Defined Function - Needed
 
Hi Vadhimoo,

'----------------
Thanks.Correct me if i am wrong, in VLOOKUP , lookup_value must
start with first column ? Only if the "SupName" attibute is in the first
column ,
it will work properly. But In my structured workbook1.sheet1 "SupName"
placed in middle of the workbook.We dont want to change the structure.Please
assist me.
'----------------

See the formula suggested in my preceding post.


---
Regards,
Norman



Norman Jones

User Defined Function - Needed
 
Hi Vadhimoo,

'----------------
One more doubt,Instead of using sheet2, we
want to work with Workbook2.Sheet1 itself . Because Workbook2.sheet is our
main database. Its having large datas. We processed lot of sheets like
workbook1.sheet1.In this case every time we may copy the Workbook2.sheet1's
data and put into the Workbook1.sheet1?
'----------------

I the other workbook is named "My Database.xls", try a formula
of the type:

=VLOOKUP(C2,'My Database.xls'!MyTable,2,0)


---
Regards,
Norman




All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com