Function debug help please

A

Adam Kroger

I need a cell to display the number 0703 not 703. All instances of this
cell type will be 4 digits.

The number is entered on one sheet, and then located and returned by a
Vlookup on another

I am using a MID() on the VLOOKUP() cell, and need it to return 7 instead of
70.
 
A

Adam Kroger

So in the MID() command it would read: MID(TEXT(AF4,"0000"),1,2) ?

and will the TEXT() command interfere with arithmatic? The complete formuls
I am using is :
=IF(ISNUMBER(AF4),MAX(ABS(MID($AF$2,1,2) - MID(AF4,1,2)),ABS(MID(AF4,3,2) -
MID(AF4,3,2)))+MAX(0, MIN(ABS(MID($AF$2,1,2) -
MID(AF4,1,2))),ABS((MID(AF4,3,2) -
MID(AF4,3,2)))-ROUND(MAX(ABS(MID($AF$2,1,2) -
MID(AF4,1,2)),ABS(MID(AF4,3,2) - MID(AF4,3,2)))/2,0)),"")

AF4 & AF2 are both numbers that must be 4 digits for it to work properly.
 
A

Adam Kroger

I figured out how to use the Format>number>custom>0000
Thanks for your assistance. Niek, the solution you offered game me the key
to figure it out.
 
Top