Forum

Text.Middle Text.Ra...
 
Notifications
Clear all

Text.Middle Text.Range

2 Posts
2 Users
0 Reactions
121 Views
(@vrossouw7)
Posts: 12
Eminent Member
Topic starter
 

Hi
My Excel was recently upgraded to 2016.  For some reason the Text.Middle function no longer works.  So I have to go with Text.Range.

My formula is looking at a column that may have between nine and more characters.

If the column has 9 characters, then I need the result to be the first 9. 
Or else I need the result to be the first 10 characters. (Most will have 10).

This is my formula, however, it is giving me an error if the column has a material with only 9 characters.   

Text.Range([Material number],0,10)

I hope you can help.  Sounds like an if statement, but I can't figure it out.

 

Thanks in advance

Vicky

 
Posted : 17/02/2021 10:32 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Vicky,

It sounds like you need to update Excel. If you had Text.Middle before and now you don't then that's a regression. I'd get on to IT!

As for your formula, try:

=if Text.Length([Material number]) < 10 then Text.Range([Material number],0,9) else Text.Range([Material number],0,10)

Mynda

 
Posted : 17/02/2021 8:41 pm
Share: