bool checkDuplicate(Excel._Worksheet xlWorksheet, string companyName, string companyPhone, string companyEmail, string companyWebsite) { Excel.Range xlRange = xlWorksheet.UsedRange; xlRange.Cells[13, 3].Value2 = companyName; xlRange.Cells[13, 4].Value2 = companyPhone; xlRange.Cells[13, 5].Value2 = companyEmail; xlRange.Cells[13, 6].Value2 = companyWebsite; xlWorksheet.Calculate(); string duplicateCheckName = (string)(xlRange.Cells[15, 3] as Excel.Range).Value2; string duplicateCheckPhone = (string)(xlRange.Cells[15, 4] as Excel.Range).Value2; string duplicateCheckEmail = (string)(xlRange.Cells[15, 5] as Excel.Range).Value2; string duplicateCheckWebsite = (string)(xlRange.Cells[15, 6] as Excel.Range).Value2; if (/*duplicateCheckName == "DUPLICATE!!" || */ /* Took out check company name, it sucks */ duplicateCheckPhone == "DUPLICATE!!" || duplicateCheckEmail == "DUPLICATE!!" || duplicateCheckWebsite == "DUPLICATE!!") { textDebugger.AppendText("Lead dupe excel found: " + String.Concat(companyName, ",", companyEmail, ",", companyWebsite) + Environment.NewLine); return true; } else return false; }