Hello,
I am working on an excel spreadsheet for work and I need help creating a custom formula. At work we use cost codes in order to hide our cost from the customers. It would be very helpful to be able to enter our cost in standard currency format (i.e., 195; 11; 12.99; 0.75), and have it automatically convert to our cost code format (i.e., 195; 11; 1299; 0075). Can someone please help me find the appropriate Public Function that I need in order to create my custom formula, as well as help me with how to write the custom formula??
I need there to be zeros where there is a tens place if it is a single digit number, and I need two zeros for the tens and ones place if it is cents only. If it is a whole, two-digit or three-digit number then it can stay as is. If there is a decimal place, then I need the decimal removed. Below are examples of how I would need the codes to be formatted:
.45 = 0045
.50 = 0050
5 = 05
4.95 = 0495
11 = 11
11.50 = 1150
250 = 250
199.95 = 19995
1000 = 1000
1000.05 = 100005
Is there a way to create a formula to satisfy these conditions?? I would really appreciate it!
Thank you!!
Bookmarks