Forum Discussion
trrob2
Jan 19, 2024Copper Contributor
Excel Formulas not calculating correctly
I use CONCATENATE to create unique strings of text in my data pulls such as Department Code (3001), Employee ID (123456789), Date in numerical format (ie 11/17/2023 = 45247, 11/24/2023 = 45254, and s...
AshaKantaSharma
Aug 20, 2024Iron Contributor
When you concatenate numeric strings in Excel, sometimes the results can be treated differently depending on the context. This can especially be an issue with functions like SUMIF when dealing with large numbers or mixed data types.
Use Text Formatting: Ensure that your concatenated result is explicitly treated as text. For example, use TEXT function to format numbers as text. Change your concatenation formula to something like:
excel
Copy code
=CONCATENATE(TEXT(DepartmentCode, "0000"), TEXT(EmployeeID, "000000000"), TEXT(DateValue, "00000"))
Use Text Formatting: Ensure that your concatenated result is explicitly treated as text. For example, use TEXT function to format numbers as text. Change your concatenation formula to something like:
excel
Copy code
=CONCATENATE(TEXT(DepartmentCode, "0000"), TEXT(EmployeeID, "000000000"), TEXT(DateValue, "00000"))