RE: $$Excel-Macros$$ VBA Code against VLOOKUP function

2011-07-16 Thread Rajan_Verma
Try This Code

 

Sub VlookupByCodes()

Dim ResultRange As Range

Dim SearchRange As Range

Dim ColNum As Integer

Dim LookUpValue As Range

Dim cellResult As Range

Dim CellSearch As Range

Dim i As Integer

 

Set ResultRange = Application.InputBox("Select the Range Where You
want Output", , , , , , , 8)

Set LookUpValue = Application.InputBox("Select the Range of
searchable Value", , , , , , , 8)

Set SearchRange = Application.InputBox("Select the Range to Search
Value", , , , , , , 8)

ColNum = Application.InputBox("Give Colnum")

i = 1



For Each cellResult In ResultRange

For Each CellSearch In SearchRange

If CellSearch.Value =
LookUpValue.Cells(i, 1).Value Then

cellResult.Value =
CellSearch.Offset(0, ColNum).Value

i = i + 1

Exit For

End If

Next

Next

Set ResultRange = Nothing

Set LookUpValue = Nothing

Set SearchRange = Nothing

Set cellResult = Nothing

Set CellSearch = Nothing



End Sub

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Anil Bhange
Sent: Friday, July 15, 2011 11:32 AM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ VBA Code against VLOOKUP function

 

Hi Masters,

 

Needed the VBA code which work similar to VLOOKUP function where I can call
data from master worksheet to fill my report 

 

Attached file will explain you my requirement

 

Master worksheet contains - GL Code master where each GL code has details
and grouping

While putting GL code in Report worksheet it should call the data from
master worksheet and give me Group 1 and Group 2

 

 

Please help

 

Regards, Anil Bhange

 

 

-- 

--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ VBA Code against VLOOKUP function

2011-07-15 Thread NOORAIN ANSARI
Dear Anil,

Please see attached Sheet..

-- 
Thanks & regards,
Noorain Ansari
*http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/>


On Fri, Jul 15, 2011 at 12:54 PM, Anil Bhange <
anil.bha...@tatacommunications.com> wrote:

>  Thanks Noorain,
>
> ** **
>
> One more help please, If the GL code doesn’t match can I able to color
> these cell in Red color
>
> ** **
>
> Regards,Anil Bhange
>
> IP Phone - 512320 | Mobile - 90290 32123
>
> ** **
>
> *From:* excel-macros@googlegroups.com [mailto:
> excel-macros@googlegroups.com] *On Behalf Of *NOORAIN ANSARI
> *Sent:* Friday, July 15, 2011 12:31 PM
> *To:* excel-macros@googlegroups.com
> *Subject:* Re: $$Excel-Macros$$ VBA Code against VLOOKUP function
>
> ** **
>
> Dear Anil,
>
>  
>
> Please see attached Sheet, 
>
>
> -- 
>
> Thanks & regards,
>
> Noorain Ansari
>
> *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/>
> 
>
> ** **
>
> On Fri, Jul 15, 2011 at 11:32 AM, Anil Bhange <
> anil.bha...@tatacommunications.com> wrote:
>
> Hi Masters,
>
>  
>
> Needed the VBA code which work similar to VLOOKUP function where I can call
> data from master worksheet to fill my report 
>
>  
>
> Attached file will explain you my requirement
>
>  
>
> Master worksheet contains – GL Code master where each GL code has details
> and grouping
>
> While putting GL code in Report worksheet it should call the data from
> master worksheet and give me Group 1 and Group 2
>
>  
>
>  
>
> Please help
>
>  
>
> Regards, Anil Bhange
>
>  
>
>  
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>
>
>
> 
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


VBA_Code_for_VLOOKUP(Solved)(Colored).xlsm
Description: Binary data


RE: $$Excel-Macros$$ VBA Code against VLOOKUP function

2011-07-15 Thread Anil Bhange
Thanks Noorain,

One more help please, If the GL code doesn't match can I able to color these 
cell in Red color

Regards,Anil Bhange
IP Phone - 512320 | Mobile - 90290 32123

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On 
Behalf Of NOORAIN ANSARI
Sent: Friday, July 15, 2011 12:31 PM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ VBA Code against VLOOKUP function

Dear Anil,

Please see attached Sheet,

--
Thanks & regards,
Noorain Ansari
http://noorain-ansari.blogspot.com/

On Fri, Jul 15, 2011 at 11:32 AM, Anil Bhange 
mailto:anil.bha...@tatacommunications.com>> 
wrote:
Hi Masters,

Needed the VBA code which work similar to VLOOKUP function where I can call 
data from master worksheet to fill my report

Attached file will explain you my requirement

Master worksheet contains - GL Code master where each GL code has details and 
grouping
While putting GL code in Report worksheet it should call the data from master 
worksheet and give me Group 1 and Group 2


Please help

Regards, Anil Bhange


--
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at 
http://www.excel-macros.blogspot.com<http://www.excel-macros.blogspot.com/>
4. Learn VBA Macros at 
http://www.quickvba.blogspot.com<http://www.quickvba.blogspot.com/>
5. Excel Tips and Tricks at 
http://exceldailytip.blogspot.com<http://exceldailytip.blogspot.com/>

To post to this group, send email to 
excel-macros@googlegroups.com<mailto:excel-macros@googlegroups.com>

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


--
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to 
excel-macros@googlegroups.com<mailto:excel-macros@googlegroups.com>

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ VBA Code against VLOOKUP function

2011-07-15 Thread NOORAIN ANSARI
Dear Anil,

Please see attached Sheet,

-- 
Thanks & regards,
Noorain Ansari
*http://noorain-ansari.blogspot.com/* 


On Fri, Jul 15, 2011 at 11:32 AM, Anil Bhange <
anil.bha...@tatacommunications.com> wrote:

>  Hi Masters,
>
> ** **
>
> Needed the VBA code which work similar to VLOOKUP function where I can call
> data from master worksheet to fill my report 
>
> ** **
>
> Attached file will explain you my requirement
>
> ** **
>
> Master worksheet contains – GL Code master where each GL code has details
> and grouping
>
> While putting GL code in Report worksheet it should call the data from
> master worksheet and give me Group 1 and Group 2
>
> ** **
>
> ** **
>
> Please help
>
> ** **
>
> Regards, Anil Bhange
>
> ** **
>
> ** **
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


VBA_Code_for_VLOOKUP(Solved).xlsm
Description: Binary data


$$Excel-Macros$$ VBA Code against VLOOKUP function

2011-07-14 Thread Anil Bhange
Hi Masters,

Needed the VBA code which work similar to VLOOKUP function where I can call 
data from master worksheet to fill my report

Attached file will explain you my requirement

Master worksheet contains - GL Code master where each GL code has details and 
grouping
While putting GL code in Report worksheet it should call the data from master 
worksheet and give me Group 1 and Group 2


Please help

Regards, Anil Bhange


-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


VBA Code for VLOOKUP.xlsx
Description: VBA Code for VLOOKUP.xlsx