Convert an Excel formula to a Macro

griffibr

New Member
Joined
Oct 7, 2008
Messages
10
First of all I'd like the macro to highligh the entire sheet (I can do that part) and edit any cell that has the following "type" entry: "<10000", "<60000" etc. I would like these entries changed to "<1,000" and "<60,000" respectfully. I generated an excel formula to generate the desired change:
="<"&TEXT(MID(A1,2,10),"#,##0"); provided cell A1 = <1000 and cell B1 had the above formula, I would get the this out come: "<1,000"

Thanks for yor response,
griffibr
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the board.

What about using Find and Replace (using Match Entire Cell Contents if necessary) ?
 
Upvote 0
That's a good point. I could "record" a macro for "find and replace" but I want to catch every possibility; not all the entry will be "<1000" or "<60000". But, if I see a pattern I'll consider that. Thank you.
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,685
Members
449,463
Latest member
Jojomen56

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