Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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
........... .... ...... .......
........
........... ..... ...... .......
.......




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
Need to open the Function Arguments window from VBA for a user defined function. [email protected] Excel Programming 0 June 20th 06 03:53 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
USer Defined Function Excel Dummy[_2_] Excel Programming 2 November 5th 03 11:33 AM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"