Hi Rajan,

Thanks for reply How can i give the inputs In Input boxes. Please explain


*Best Regards,*
*Venkat*
*Chennai*
*
*

On Wed, Aug 3, 2011 at 1:27 PM, Rajan_Verma <rajanverma1...@gmail.com>wrote:

>  *See if it Helps :*
>
> * *
>
> *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*
>
> *                                                If
> hasComment(CellSearch.Offset(0, ColNum)) = True Then*
>
> *                                                    cellResult.AddComment
> *
>
> *
> cellResult.Comment.Visible = True*
>
> *
> cellResult.Comment.Text CellSearch.Offset(0, ColNum).Comment.Text*
>
> *                                                End If*
>
> *                                        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*
>
> * *
>
> * *
>
> *Private Function hasComment(cell As Range) As Boolean*
>
> *On Error GoTo err:*
>
> *If cell.Comment.Text <> "" Then*
>
> *hasComment = True*
>
> *Else*
>
> *hasComment = False*
>
> *End If*
>
> *err:*
>
> *If err.Number <> 0 Then*
>
> *hasComment = False*
>
> *End If*
>
> *End Function*
>
> * *
>
> *From:* excel-macros@googlegroups.com [mailto:
> excel-macros@googlegroups.com] *On Behalf Of *Venkat CV
> *Sent:* Wednesday, August 03, 2011 12:54 PM
> *To:* excel-macros@googlegroups.com
> *Subject:* Re: $$Excel-Macros$$ Vlookup Including Cell Comments..****
>
> ** **
>
> Dear Ashish,****
>
>  ****
>
> Find attached Sample Worksheet with my requiremnt.. ****
>
> *Best Regards,*****
>
> *Venkat*****
>
> *Chennai*****
>
> ** **
>
> On Wed, Aug 3, 2011 at 12:01 PM, ashish koul <koul.ash...@gmail.com>
> wrote:****
>
> can you attach the worksheet ****
>
> ** **
>
> On Wed, Aug 3, 2011 at 11:11 AM, Venkat CV <venkat1....@gmail.com> wrote:*
> ***
>
> Dear All, ****
>
> ** **
>
> Let me know how to Vlookup Including Cell Comments..in Each Cells...****
>
> ** **
>
>
> ****
>
> *Best Regards,*****
>
> *Venkat*****
>
> *Chennai*****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> --
>
> ----------------------------------------------------------------------------------
> 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****
>
>
>
> ****
>
> -- ****
>
> *Regards*****
>
> * *****
>
> *Ashish Koul*****
>
> *akoul*.*blogspot*.com <http://akoul.blogspot.com/>*
> http://akoul.posterous.com/*****
>
> *akoul*.wordpress.com <http://akoul.wordpress.com/>****
>
> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>***
> *
>
>  ****
>
> P Before printing, think about the environment.****
>
>  ****
>
> ** **
>
> --
>
> ----------------------------------------------------------------------------------
> 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

Reply via email to