Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to match/compare cell values
how do i compare/match cell value from worksheet 1 with 4 cell values from worksheet 2? please help, thank you. -- tandavina ------------------------------------------------------------------------ tandavina's Profile: http://www.excelforum.com/member.php...o&userid=30334 View this thread: http://www.excelforum.com/showthread...hreadid=499997 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to match/compare cell values
I'm sure it could be done using formulas directly in the Excel workbook
but I usually use VBA. Something like this could be used to compare 1 name entered in the first cell of Sheet 1 to 4 names entered into the first 4 cells of column A in Sheet 2 . . . Sub findMatch() Dim myName As String Dim findName As Variant Dim loopCounter As Integer myName = Sheets("Sheet1").Range("A1").Value findName = Sheets("Sheet2").Range("A1:A4") For loopCounter = 1 To 4 If myName = findName(loopCounter, 1) Then MsgBox "Match Found! Hello " & myName End If Next loopCounter End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compare and match names and extract a cell content | Excel Worksheet Functions | |||
Compare cell values | Excel Worksheet Functions | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming | |||
compare two cell values on different sheets | Excel Programming |