Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-17-2015, 12:11 PM
Snakehips Snakehips is offline Find text within cell and return column and row title next to the name on a new sheet. Windows 8 Find text within cell and return column and row title next to the name on a new sheet. Office 2013
Advanced Beginner
 
Join Date: Mar 2015
Posts: 36
Snakehips is on a distinguished road
Default

TanyaBrowning,
Try the following.....

Code:
Sub Map_Peeps()
Dim Skills As Range
Dim GotIt As RangeDim LastC As Range
Dim First As String
Dim lr As Long, c As Long
Dim Who As String
Set Skills = Sheets("Skill Map").Range("A1:K11")  'edit to suit

With Sheets("Person Map")
    lr = .Cells(Cells.Rows.Count, "A").End(xlUp).Row
    Set People = .Range("A2:A" & lr)
End With

For Each Peep In People
    Who = Peep.Value
    c = 0
        With Skills
            Set LastC = .Cells(.Cells.Count)
        
            Set GotIt = .Find(what:=Who, after:=LastC)
        
            If Not GotIt Is Nothing Then First = GotIt.Address
       
            Do Until GotIt Is Nothing
                c = c + 1
                Peep.Offset(0, c) = .Cells(GotIt.Row, 1) & " " & .Cells(1, GotIt.Column)
                Set GotIt = .FindNext(after:=GotIt)
                If GotIt.Address = First Then Exit Do
            Loop
        End With
Next Peep

End Sub
Hope that helps.
Reply With Quote
 

Tags
find, vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find text within cell and return column and row title next to the name on a new sheet. Search for multiple texts in cell, return specific text mariur89 Excel 4 12-14-2014 01:33 AM
Return Sum value of one column from cells not blank in another column zulugandalf Excel 3 08-14-2014 03:37 AM
Find text within cell and return column and row title next to the name on a new sheet. Help Coloring a cell in Sheet one if data is missing from another sheet Aeducan Excel 1 06-22-2014 04:49 PM
as the return value of another column, using Listbox? marreco Excel Programming 1 03-27-2012 12:48 PM
Find text within cell and return column and row title next to the name on a new sheet. Need to search a column for a macth and return a result from a third column pdfaust Excel 2 02-03-2011 03:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:44 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft