Need help understanding SUBSTITUTE MID SUBSTITUTE REPT formula

szakharov7723

Board Regular
Joined
Jun 22, 2018
Messages
85
Office Version
  1. 2019
Platform
  1. Windows
So yeah surprisingly I didn't find any explanations on this semi complicated formula
=SUBSTITUTE(MID(SUBSTITUTE("_" & B7&REPT(" ",6),"_",REPT(",",255)),2*255,255),",","")

So here I used it to extract a value between "_" characters. But I want to make other additions/operations to this formula and in order to do that I need to understand every part of it.
I tried to take it apart, but it is not that obvious, because it shows no real value, so I can't really locate where operation takes place.

Can you please help me understand this formula in specifics ?
Like why exactly each formula has been used and what are these numbers and symbols.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi,

It's probably better if we start with you showing a list of your possible data, and what you need extracted from it, then go from there.
 
Upvote 0
Hi,
The idea was using this formula make a change in file path, so it goes not to 1 January, but to 2 January file, and so on.
However I actually found a potentially better way of doing it by concatenating different elements of file path using respective date. And applying Evaluate VBA code.
Thank you for responding though
 
Upvote 0
You're welcome, glad you sorted it out.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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