Richard U
Active Member
 Joined
 Feb 14, 2006
 Messages
 402
 Office Version

 365
 2016
 2010
 2007
 Platform

 Windows
I have this formula
=IF(OR((IF(‘Sheet 1’!AJ6=0;""; ‘Sheet 1'!AJ6))="";(IF(‘Sheet 1'!AJ6=0;""; ‘Sheet 1'!AJ6))=" ");"~";IF(LEFT(‘Sheet 1'!AM6;3)="940";"RSW INPUT";IF(LEFT(‘Sheet 1'!AM6;3)="401";"REU INPUT";IF(LEFT(‘Sheet 1'!AM6;3)="200";"ANZ INPUT";IF(RIGHT($M6;2)="MX";"#N/A";IF(‘Sheet 1'!AN6="COMPANY NAME";"RNA INPUT";VLOOKUP(E6&" "&(IF‘Sheet 1'!AJ6=0;"";'Portal Data'!AJ6));Sarep!$B$4:$C$291;2;"FALSE")))))))
Which I need to translate into some maintainable VBA code, but I can't quite figure out what this is doing. I'm a good coder, but the nested excel formulas confuse me.
Could someone please explain what this formula is doing? I can write the code myself once I understand the logic, but I can't seem to unravel this myself
=IF(OR((IF(‘Sheet 1’!AJ6=0;""; ‘Sheet 1'!AJ6))="";(IF(‘Sheet 1'!AJ6=0;""; ‘Sheet 1'!AJ6))=" ");"~";IF(LEFT(‘Sheet 1'!AM6;3)="940";"RSW INPUT";IF(LEFT(‘Sheet 1'!AM6;3)="401";"REU INPUT";IF(LEFT(‘Sheet 1'!AM6;3)="200";"ANZ INPUT";IF(RIGHT($M6;2)="MX";"#N/A";IF(‘Sheet 1'!AN6="COMPANY NAME";"RNA INPUT";VLOOKUP(E6&" "&(IF‘Sheet 1'!AJ6=0;"";'Portal Data'!AJ6));Sarep!$B$4:$C$291;2;"FALSE")))))))
Which I need to translate into some maintainable VBA code, but I can't quite figure out what this is doing. I'm a good coder, but the nested excel formulas confuse me.
Could someone please explain what this formula is doing? I can write the code myself once I understand the logic, but I can't seem to unravel this myself