Concatenate with Superscripted Text

thespardian

Board Regular
Joined
Aug 31, 2012
Messages
119
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
The text is the column D is formated as superscript. I concatenate the Column A,B,C and D in the column F.
Book1.xlsm
ABCDEF
10.99±0.03A0.99±0.03A
20.99±0.03A0.99±0.03A
30.99±0.01A0.99±0.01A
40.99±0.03A0.99±0.03A
50.99±0.02A0.99±0.02A
60.96±0.02AB0.96±0.02AB
70.96±0.02AB0.96±0.02AB
80.93±0.02ABC0.93±0.02ABC
90.93±0.01ABC0.93±0.01ABC
100.93±0.02ABC0.93±0.02ABC
110.92±0.01ABCD0.92±0.01ABCD
120.92±0.01ABCD0.92±0.01ABCD
130.92±0.02ABCD0.92±0.02ABCD
140.87±0.02BCDE0.87±0.02BCDE
150.82±0.05BCDE0.82±0.05BCDE
160.82±0.02BCDE0.82±0.02BCDE
170.81±0.02CDE0.81±0.02CDE
180.79±0.05DEF0.79±0.05DEF
Sheet1
Cell Formulas
RangeFormula
F1:F18F1=A1&B1&C1&D1

i want my result as highlighted in the yellow in the picture below. Please note that the last part of the column F (which is the text in columnD) is superscipted. Any help will be highly appreciated.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Q1.png
 
Upvote 0
From everything I read, you cannot do that with an Excel formula.
You would need to use VBA. There are some examples shown here:
11 Ways to Add Subscripts or Superscripts in Microsoft Excel | How To Excel (see "Add Subscript or Superscript with VBA" section of post)
 
Upvote 0
@Joe4 thanks for the link. I am newbie with vb and couldn't find a way to solve my problem with the link you provided. can you please write the code for me?
 
Upvote 0
I was working on the below, it should help:
VBA Code:
Sub test()
    Dim rng As Range, rCell As Range
    
    Set rng = Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
    
    For Each rCell In rng
        With rCell
            .Offset(, 5) = Join(Array(.Value, .Offset(, 1), .Offset(, 2), .Offset(, 3)), "")
            .Offset(, 5).Characters(Len(.Offset(, 5)) - Len(.Offset(, 3)) + 1, Len(.Offset(, 3))).Font.Superscript = True
        End With
    Next rCell
End Sub
 
Upvote 1
Solution

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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