below is an example how you can make it a bit more readable
also if oyu use SmtpAddress you shouldnt have to worry about the x400 stuff
SenderName = (olInbox.Items.Item(i).SmtpAddress)
'A = 65
'G = 71
'H = 72
'O = 79
'P = 80
'Z = 90
Dim numericLetterValue As Integer
numericLetterValue = Asc(UCase(Left(SenderName, 1)))
If numericLetterValue > 64 And numericLetterValue < 72 Then
MsgBox ("From a-g")
Set MyFolder = Application.Session.Folders("me@company.com").Folders("test")
ElseIf numericLetterValue > 71 And numericLetterValue < 80 Then
MsgBox ("From h-o")
Set MyFolder = Application.Session.Folders("me@company.com").Folders("test 2")
ElseIf numericLetterValue > 79 And numericLetterValue < 91 Then
MsgBox ("From p-z")
Set MyFolder = Application.Session.Folders("me@company.com").Folders("test 3")
ElseIf MyFolder Is Nothing Then
MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
Else
olInbox.Items.Item(i).Move MyFolder
End If