• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

vlookup vba

tam_das

New Member
i have two sheets name is sheet1 and sheet2,i want to add vba code in sheet2 what will eneble me to retrive corosponding data from column3 of sheet1
 
Good day tam_das


Are you just wanting to pull data from a all the cells in sheet1 column3 and place the data into column3 of sheet2
 
no sir pls let me explain

[pre]
Code:
sheet1                   Sheet2
name  amount             name  amount
a      1                  a    1
b      2                  b
c      3                  c
d      4
[/pre]
in the sheet 1 and in the colomn c there are few names of person and just beside that there is a amount column, i want to procure that data of amount in sheet 2 if there is same person of that name ,it is like vlookup, but if i i put vlook formula it takes longer time even when tried macro it works but it becames slow bcs there is 1000 rows
 
Hi Das ,


1000 rows does not explain why a spreadsheet which has VLOOKUP formulae should become slow ; can you post a sample formula which you have used ?


Narayan
 
http://rapidshare.com/files/1315507664/for%20question.xlsx


i have posted sample file as mentioned above, containing my question,pls refer it, actually i want to to circulate my file so that no one can see my working, so i want to apply vba and vba coding for the said question i do not know pls sugest..
 
Hi Das,


It seems to me that you want to:

1. Cross reference the name in sheet 2 against sheet 1, to find out the amount; and

2. To prevent others from seeing your formula which is why you want to use a macro.


You may want to use index match instead of vlookup. I certainly prefer that to vlookup. I've read that it is supposedly faster though I am not sure if this is really the case. Certainly more flexible than vlookup though.


To prevent others from seeing your formula, just password protect your worksheet. Select the amount column in sheet 2, go to format and ensure all the cells are locked. Go to review (ribbon) and choose protect sheet. Just uncheck "select locked cells" if you dont want others to view your formula.


Hope this helps.
 
Back
Top