Formatting a return from a formula to a number

gr8trthanu72

New Member
Joined
Nov 15, 2013
Messages
31
Hello - not having a good time with this problem.

In column "D" I have a list of order numbers which depending on the first three characters determine the type of order.
IE:060 is regular order / 070 is regular order / 800 is rush order.

I have a table the holds all the order prefixes (060/070/800) and the type of order.

I have a MID formula in column R to pull the first three characters but when I use vlookup in column T the result is #NA because the search criteria is not the same format as the table I am searching for.

However, if I copy the entire R row and paste into column S and then use the "convert to number" that appears when there is a format issue I get the expected result in column U.

How can I automate the formatting of column R in a number format with a macro?

worksheet snipit below.

Thank You
DRSTU
License Plate NumberOrder Type W/O FormatOrder Type W FormatWithout FormatWith Format
060192094-A1060
60​
#N/A​
Regular_Orders
060192169-A2060
60​
#N/A​
Regular_Orders
060192191-A2060
60​
#N/A​
Regular_Orders
060192210-A1060
60​
#N/A​
Regular_Orders
060192216-A1060
60​
#N/A​
Regular_Orders
060192222-A1060
60​
#N/A​
Regular_Orders
060192240-A1060
60​
#N/A​
Regular_Orders
060192251-A1060
60​
#N/A​
Regular_Orders
060192270-A1060
60​
#N/A​
Regular_Orders
060192274-A1060
60​
#N/A​
Regular_Orders
060192275-A2060
60​
#N/A​
Regular_Orders
060192277-A1060
60​
#N/A​
Regular_Orders
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I struggled with this for along time for such an easy fix

Dont even know what --Mid( does but will research but it worked

Thank YOu
 
Upvote 0
double unary will change text number to number number
--MID
1*MID
0+MID
all doing the same
result cell should be in number format
 
Last edited:
Upvote 0
thank you - perhaps you could help with one other issue.

I have a main sheet with thousands of rows of data.

In column S there is either "Rush", "Regular" or "Dealer" in each row.

I have three sheets that are named after above (IE: Rush)

If a row has "Rush" in column S, I would like excel to copy columns A:S and paste in the sheet entitled "Rush" starting in row 2

This would be the same for "Regular" and "Dealer"

Again thank you
 
Upvote 0

Forum statistics

Threads
1,215,145
Messages
6,123,289
Members
449,094
Latest member
GoToLeep

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top