Hi,
I'm trying to write my own excel funtion with VBA here. Currently I'm trying to replace this code (it's dutch):
It works, but I've stumbled upon an error... I really don't want to break this code in a million peaces to find out what the problem is...![]()
=ALS(E4="";"";ALS(E4=M4;L4;ALS(E4=M5;L5;ALS(E4=M6;L6;ALS(E4=M7;L7;ALS(E4=M8;L8;ALS(E4=M9;L9;ALS(E4=M10;L10;ALS(E4=M11;L11;ALS(E4=M12;L12;ALS(E4=M13;L13;ALS(E4=M14;L14;ALS(E4=M15;L15;ALS(E4=M16;L16;ALS(E4=M17;L17;ALS(E4=M18;L18;ALS(E4=M19;L19;ALS(E4=M20;L20;ALS(E4=M21;L21;ALS(E4=M22;L22;ALS(E4=M23;L23;ALS(E4=M24;L24;ALS(E4=M25;L25;ALS(E4=M26;L26;ALS(E4=M27;L27;ALS(E4=M28;L28;ALS(E4=M29;L29;ALS(E4=M30;L30;ALS(E4=M31;L31;ALS(E4=M32;L32;ALS(E4=M33;L33;ALS(E4=M34;L34;ALS(E4=M35;L35;ALS(E4=M36;L36;""))))))))))))))))))))))))))))))))))
So, I decided to write a function that does exactly the same, but looks 10 times better. The only problem is, yesterday I found this site that did exactly what I was looking for, now I lost it.
I do know a few things when it comes to programming, I just don't know anything when it comes to excel programming...
So far I have:
So now it can do the same as the function I've written with the if function. Now I want to active it by typing:![]()
If Target.cell > 0 Then If Target.cell = M4 Then Target.Value = L4 If Target.cell = M5 Then Target.Value = L5 [.............] If Target.cell = M35 Then Target.Value = L35 If Target.cell = M36 Then Target.Value = L36
![]()
=Journaalpost(E4)
Kind regards,
ColdDeath
Bookmarks