Lookup based on Column headers


"Excel VBA Help"

 


Play Friv Now - Play Friv Games
Go Back   The Code Cage Forums > Microsoft Topics > Microsoft Excel Forum
Our Info Pages:-
The Code Cage - Microsoft Office help

Notices

Microsoft Excel Forum Members Post questions in this forum if they are related to using Microsoft Excel, this includes Worksheet Functions, Excel VBA Programming, Simple Macro Code & Charting, Excel formula etc.

New Reply
Thread Tools Rate Thread Display Modes
  #1  
Unread 16th February 2012, 14:41
rkb2k9's Avatar
rkb2k9 rkb2k9 is offline
Junior Member
MS Office Version: Excel 2010
MS Office Skill Level: Can use VBA
 
Join Date: Nov 2010
Location: Bangalore
Age: 31
Posts: 35
Posts Per Day: 0.02
My Top Tip Count: 0
Thanks to others: 5
Thanked 0 Times in 0 Posts
Reputation: 10 (5) rkb2k9 is on a distinguished road
India
Default Lookup based on Column headers
     Excel: VBA   


------ Register to get rid of these "In Post" ads! ------

Category: Excel: VBA   

Hi,
I am looking for a VBA code to do lookup if the Column header matches on two different sheets and the result has to be displayed next to the last cell.

For ex:-

Sheet1 is having 12 columns out of that a column having header desc

sheet2 having 10 columns out of that a column is having header desc

now i have to lookup sheet1 desc column value in sheet2 desc column values and result has to be shown next to the last column

Thanks for help in advance
Regards,
Rkb2k9

The Code Cage Advertisment
Advertisement
  #2  
Unread 16th February 2012, 14:57
Pete_UK's Avatar
Pete_UK Pete_UK is offline
Solution Centre Professional
MS Office Version: MS Office 2003, 2007
MS Office Skill Level: Proficient with Excel
 
Join Date: Mar 2009
Location: Warrington, England
Age: 62
Posts: 625
Posts Per Day: 0.30
My Top Tip Count: 0
Thanks to others: 8
Thanked 132 Times in 131 Posts
Reputation: 2587 (37) Pete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond repute
Great_Britain
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Why not add a workbook?
Providing a workbook will not only get you your answer quicker but will better illustrate your problem, usually when we can see your data (it can be dummy data but must be of the same type) and your structure it is far easier for us to give you a tailored, workable answer to your query

Pete

  #3  
Unread 16th February 2012, 15:35
rkb2k9's Avatar
rkb2k9 rkb2k9 is offline
Junior Member
MS Office Version: Excel 2010
MS Office Skill Level: Can use VBA
 
Join Date: Nov 2010
Location: Bangalore
Age: 31
Posts: 35
Posts Per Day: 0.02
My Top Tip Count: 0
Thanks to others: 5
Thanked 0 Times in 0 Posts
Reputation: 10 (5) rkb2k9 is on a distinguished road
India
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Hi,

Sorry for inconvenience i am adding workbook. Find the same in attachment.Looking for early reply
Attached Files To view attachments in this forum your post count must be 2 or greater. You currently have 0 posts.

The Code Cage Advertisment
Advertisement
  #4  
Unread 16th February 2012, 15:52
Pete_UK's Avatar
Pete_UK Pete_UK is offline
Solution Centre Professional
MS Office Version: MS Office 2003, 2007
MS Office Skill Level: Proficient with Excel
 
Join Date: Mar 2009
Location: Warrington, England
Age: 62
Posts: 625
Posts Per Day: 0.30
My Top Tip Count: 0
Thanks to others: 8
Thanked 132 Times in 131 Posts
Reputation: 2587 (37) Pete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond reputePete_UK has a reputation beyond repute
Great_Britain
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


I've looked at your attached file, but it is not very clear to me what it is that you want to do. Can you please explain more clearly what you start off with and what you want to achieve?

Hope this helps.

Pete

  #5  
Unread 16th February 2012, 19:25
RoyUK's Avatar
RoyUK RoyUK is offline
Administrator
Solution Centre Professional
MS Office Version: MS Office 2003, 2007, 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Nov 2008
Location: Derbyshire, UK
Posts: 2,686
Posts Per Day: 1.20
My Top Tip Count: 4
Thanks to others: 2
Thanked 194 Times in 192 Posts
Reputation: 3305 (66) RoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond repute
4 Top Tips
England
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Do you mean HLOOKUP?
__________________
Hope that helps, RoyUK
For tips & examples visit free excel help
DatabaseForm
About me

  #6  
Unread 17th February 2012, 15:04
rkb2k9's Avatar
rkb2k9 rkb2k9 is offline
Junior Member
MS Office Version: Excel 2010
MS Office Skill Level: Can use VBA
 
Join Date: Nov 2010
Location: Bangalore
Age: 31
Posts: 35
Posts Per Day: 0.02
My Top Tip Count: 0
Thanks to others: 5
Thanked 0 Times in 0 Posts
Reputation: 10 (5) rkb2k9 is on a distinguished road
India
Question Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


HI,
I am looking for a VBA code to check weather part in sheet1 is present in sheet2 part and the result has to be populated to the last of the sheet1 column

------------------------------ posted before receiving a reply after 17 minutes of original post ------------------------------

HI,
I am attaching the sample sheet explaining clearly the criteria. Sorry for the confusion. As the columns are not consitent I am tring to do lookup based on Column header. IN this case Part in the Column header. It has to search Part as column header in sheet1 and sheet2 then it has to populate the result

------------------------------ posted before receiving a reply after 5 Hours 22 minutes of original post ------------------------------

HI Roy,

I am looking for a VBA code rather than formula. Thanks for help

HI Pete,
I had pasted the requirement clearly. Think it will help me to solve my problem..
Regards,
Maruthi
Attached Files To view attachments in this forum your post count must be 2 or greater. You currently have 0 posts.


Last edited by rkb2k9; 17th February 2012 at 15:03.
The Code Cage Advertisment
Advertisement
  #7  
Unread 17th February 2012, 22:22
f.maria's Avatar
f.maria f.maria is offline
The Code Cage Staff
MS Office Version: MS Office 2003
MS Office Skill Level: Some VBA experience
 
Join Date: Jun 2011
Location: Sturovo,Slovakia
Age: 57
Posts: 348
Posts Per Day: 0.27
My Top Tip Count: 1
Thanks to others: 6
Thanked 57 Times in 55 Posts
Reputation: 902 (16) f.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to behold
1 Top Tips
Slovakia
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Do you need something like this?
Attached Files To view attachments in this forum your post count must be 2 or greater. You currently have 0 posts.
__________________
Best regards

Maria

Aesop: Little friends may prove great friends.


Last edited by f.maria; 18th February 2012 at 08:08.
Reply & Quote Reply


1 members found this post helpful.
The Following User Says Thank You to f.maria For This Useful Post:
rkb2k9 (20th February 2012)
  #8  
Unread 20th February 2012, 07:11
rkb2k9's Avatar
rkb2k9 rkb2k9 is offline
Junior Member
MS Office Version: Excel 2010
MS Office Skill Level: Can use VBA
 
Join Date: Nov 2010
Location: Bangalore
Age: 31
Posts: 35
Posts Per Day: 0.02
My Top Tip Count: 0
Thanks to others: 5
Thanked 0 Times in 0 Posts
Reputation: 10 (5) rkb2k9 is on a distinguished road
India
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Quote:
Originally Posted by f.maria View Post

Do you need something like this?

Hi Maria,
Yes i am looking for the same. and it works exactly thank you very much

  #9  
Unread 20th February 2012, 20:05
f.maria's Avatar
f.maria f.maria is offline
The Code Cage Staff
MS Office Version: MS Office 2003
MS Office Skill Level: Some VBA experience
 
Join Date: Jun 2011
Location: Sturovo,Slovakia
Age: 57
Posts: 348
Posts Per Day: 0.27
My Top Tip Count: 1
Thanks to others: 6
Thanked 57 Times in 55 Posts
Reputation: 902 (16) f.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to beholdf.maria is a splendid one to behold
1 Top Tips
Slovakia
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Glad to help you.
__________________
Best regards

Maria

Aesop: Little friends may prove great friends.

The Code Cage Advertisment
Advertisement
  #10  
Unread 7th March 2012, 07:56
rkb2k9's Avatar
rkb2k9 rkb2k9 is offline
Junior Member
MS Office Version: Excel 2010
MS Office Skill Level: Can use VBA
 
Join Date: Nov 2010
Location: Bangalore
Age: 31
Posts: 35
Posts Per Day: 0.02
My Top Tip Count: 0
Thanks to others: 5
Thanked 0 Times in 0 Posts
Reputation: 10 (5) rkb2k9 is on a distinguished road
India
Default Re: Lookup based on Column headers

------ Register to get rid of these "In Post" ads! ------


Hi Maria,

i need a small alteration in macro, i am attaching the file and in notes i had mentioned the requirement.Please let me know if you need any further info from me.

Main thing is i am looking for a input box prompt to which value has to be looked up

Thanks in advance
Attached Files To view attachments in this forum your post count must be 2 or greater. You currently have 0 posts.

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!

New Reply
The Code Cage at Facebookhe Code Cage at Twitter


Tags
based, column, headers, lookup

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

The Code Cage Affilliates



http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 20:29.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright ©2008 - , Simon lloyd.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1
Cultural Forum | Study at Malaysian University