Hi - I have a 1000+ list of participants and their organizations. I want to replace the value i column B with the Unique ID in column D, IF and only IF it is a match between column B and column C:
I´ve two problems:
1) My VBA-code is case sensitive which is wrong.
Should be => case insensitive.
I´ve tried <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->[FONT="]CompareMode = [/FONT]vbTextCompare etc. How do I solve this?
2) When no match exists the last Uniqe ID is written in the next row and I would like my VB-script to leave that cell as it was.
Here is the result of the first 8 rows:
X => The cellvalue in column A2 and A3 should be left.
Y => The cellvalue should be O_0383
Here is my code - Thank you for your time if you are able to help me. //Regards Anders Söderman

I´ve two problems:
1) My VBA-code is case sensitive which is wrong.
Should be => case insensitive.
I´ve tried <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->[FONT="]CompareMode = [/FONT]vbTextCompare etc. How do I solve this?
2) When no match exists the last Uniqe ID is written in the next row and I would like my VB-script to leave that cell as it was.
Here is the result of the first 8 rows:

X => The cellvalue in column A2 and A3 should be left.
Y => The cellvalue should be O_0383
Here is my code - Thank you for your time if you are able to help me. //Regards Anders Söderman
Code:
Private Sub FindReplace()
Dim RowCounter As Long, LastRow As Long
Dim FindValue As String
On Error Resume Next
CompareMode = vbTextCompare
LastRow = Worksheets("Sheet1").Range("B1").Rows.End(xlDown).Row
For RowCounter = 1 To LastRow
FindValue = WorksheetFunction.VLookup(Range("B" & RowCounter).Value, Worksheets("Sheet1").Range("C1:D72"), 2, 0)
Range("B" & RowCounter).Value = FindValue
Next RowCounter
End Sub