Indirect (combined with mid/trim) is not returning a numerical value

markpgates

New Member
Joined
Aug 31, 2019
Messages
4
Hi all, quickly losing my mind.

Via the forum, I've got a grip on indirect (using sheet names) to return a value based on a dynamic cell (as opposed to static).
I have then combined this with MID and TRIM to return the number portion of a text string in said sheet name as above....unbelievably that works.

For reference the formula is correctly returning the number portion of a text string from another sheet;

=TRIM(MID(INDIRECT("'"&E6&"'!"&"K15"),6,2))

The cell in K15 of the sheet (as named in E6) contains the phrase "Step 17 - Transition"
The formula returns 17 - Great!

The problem I am facing is I want to use conditional formatting on the portion that is returned (17), however I can't get it to work, and it looks like conditional formatting isn't recognizing it as a value (checked formatting of cells etc)

If however in a blank cell I type =1+ (the returned text), excel accepts it is a number, and gives me the answer of 18

I have no idea what to do, any assistance very much appreciated! Happy to send file if anyone can help!

Thanks all
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The MID function will always return a text value, even if it returns all numbers.
By applying some mathematical operation to it, like adding 1, it coerces those numbers returned as text to be numbers.
If you wanted to keep the same value, either add zero or multiply by one.
 
Upvote 0

Forum statistics

Threads
1,215,323
Messages
6,124,244
Members
449,149
Latest member
mwdbActuary

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