Custom format results as text

TC8K

New Member
Joined
Apr 30, 2021
Messages
4
Office Version
  1. 2010
Platform
  1. Windows
How do you convert custom format results to text? Can it be done in a simple way?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Welcome to the Board!

The TEXT function will do that.

So, if you have a valid date in A1, and you want it to be TEXT in a certain format, you would use:
VBA Code:
=TEXT(A1,"mm/dd/yyyy")
or something to that effect.

If you need more help, please provide details!
 
Upvote 0
Welcome to the Board!

The TEXT function will do that.

So, if you have a valid date in A1, and you want it to be TEXT in a certain format, you would use:
VBA Code:
=TEXT(A1,"mm/dd/yyyy")
or something to that effect.

If you need more help, please provide details!
I have multiple types of custom format results in a particular column.
Eg1. BTH-8673 resulted from keying in 8673+using custom format, and many more starting with BTH-...
Eg2. BJW-1653 resulted from keying in 1653+using custom format,and few more starting with BJW-...
Eg3. BTH-6732 resulted from keying in 6732+using custom format,and few more starting with BTH-...

How may I have text
BTH-8673
BTH-...
BJW-1653
BJW-...
BTH-6732
BTH-...
listed nicely in a column?

Thanks!
 
Upvote 0
The key to getting an answer that helps you is to provide us with enough information to help you.

Can you post the exact custom formats you have set-up?
How is it supposed to know when it changes?
Are you trying update current values, or new entries?
Are you trying to update the data where it resides, or in another column?
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Providing examples of what you current data looks like and what you want the expected result to look like is often helpful.
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hope I did it right...

MrExcel.xlsx
HIJ
1SNSN
2BTH-2945
3BTH-2946
4BTH-2947
5BTH-2948
6T-00208
7T-00209
8T-00210
9T-00211
10T-00212
11T-00213
12T-00214
13T-00215
14T-00216
15BE-07418
16BE-07419
17BE-07420
18BE-07421
19BE-07422
20BE-07423
21BE-07424
22BE-07425
23BE-07426
24BE-07427
25BE-07428
26BE-07429
27BE-07430
28BE-07431
29BE-07432
30BE-07433
31BE-07434
32BE-07435
33BE-07436
34BE-07437
35BE-07438
36BE-07439
37BE-07440
38BE-07441
39BE-07442
40BE-07443
41BE-07444
42BE-07445
43BE-07446
44BE-07447
45JW-04460
46JW-04461
47JW-04462
48JW-04463
49JW-04464
50JW-04465
51JW-04466
52JW-04467
53JW-04468
54JW-04469
55JW-04470
56JW-04471
57JW-04472
58JW-04473
59JW-04474
60JW-04475
61JW-04476
62JW-04477
63BE-07547
64BE-07548
65BE-07549
66BE-07550
67BE-07551
68BE-07552
69BE-07553
70T-00377
71T-00378
72T-00379
73T-00380
74T-00381
75T-00382
76T-00383
77JW-04951
78JW-04952
79JW-04953
80JW-04954
81JW-04955
82JW-04956
83JW-04957
84BE-07641
85BE-07642
86BE-07643
87BE-07644
88BE-07645
89BE-07646
90BE-07647
91JW-04904
92JW-04681
93JW-04682
94JW-04683
95JW-04684
Sheet1
 
Upvote 0
Col H are the inputs+custom formats (different formats used for different rows in the col).

How do I get the results in Col H to Col J as texts?

Thanks!
 
Upvote 0
Here is a macro that should work...
VBA Code:
Sub FormattedNumberToText()
  Dim Cell As Range
  Application.ScreenUpdating = False
  For Each Cell In Range("H2", Cells(Rows.Count, "H").End(xlUp))
    Cell.Offset(, 2) = Cell.Text
  Next
  Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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