![]() |
h2 (30), c1(33)--split- c1(30) -d1(3)
hi all,
i'm new here and i hoop you ppl can help me. this is what i wand h2 30 c1 33 -- c1 30 c2 3 i have mad this in macro Code: -------------------- Sub bereken() grens = Range("H2").Value invoer = ActiveCell.Value If invoer grens Then restwaarde = invoer - grens uitvoer = invoer - restwaarde ActiveCell.Value = uitvoer ActiveCell(2, 1).Value = restwaarde End If End Sub -------------------- i don't like it in macro so i hoop somebody has some code that does the same i put a sample in the attached.. Attachment filename: test1.xls Download attachment: http://www.excelforum.com/attachment.php?postid=505351 --- Message posted from http://www.ExcelForum.com/ |
h2 (30), c1(33)--split- c1(30) -d1(3)
I don 't think you can do what you want because if you put a formula in the
cell it will immediately lose it's value. You could use worksheet event code to trap the input and update according to your rules. Where is the input range? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "sidex " wrote in message ... hi all, i'm new here and i hoop you ppl can help me. this is what i wand h2 30 c1 33 -- c1 30 c2 3 i have mad this in macro Code: -------------------- Sub bereken() grens = Range("H2").Value invoer = ActiveCell.Value If invoer grens Then restwaarde = invoer - grens uitvoer = invoer - restwaarde ActiveCell.Value = uitvoer ActiveCell(2, 1).Value = restwaarde End If End Sub -------------------- i don't like it in macro so i hoop somebody has some code that does the same i put a sample in the attached.. Attachment filename: test1.xls Download attachment: http://www.excelforum.com/attachment.php?postid=505351 --- Message posted from http://www.ExcelForum.com/ |
h2 (30), c1(33)--split- c1(30) -d1(3)
oke i think
the input range is in H2 450 if that's true ,tobad i need to use marco do this..(btw the macro i the attached does work -- Message posted from http://www.ExcelForum.com |
h2 (30), c1(33)--split- c1(30) -d1(3)
If you use worksheet code, it will be automatic, no button pushing.
I understand that H2 is where the comparison value is, but which cells are the active cells when you click the button. This is where the worksheet event code would apply. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "sidex " wrote in message ... oke i think the input range is in H2 450 if that's true ,tobad i need to use marco do this..(btw the macro in the attached does work) --- Message posted from http://www.ExcelForum.com/ |
h2 (30), c1(33)--split- c1(30) -d1(3)
a oke. well i'm very noob in this . i'm sorry for that. but could yo
give a sample of a code.. yeah i didn't but a range a cell, becaurs every cell you can use this you could say every cell is an active cell Bob Phillips wrote: *If you use worksheet code, it will be automatic, no button pushing. I understand that H2 is where the comparison value is, but whic cells are the active cells when you click the button. This is where th worksheet event code would apply. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "sidex " wrote in message ... oke i think the input range is in H2 450 if that's true ,tobad i need to use marco do this..(btw the macr in the attached does work) --- Message posted from http://www.ExcelForum.com/ -- Message posted from http://www.ExcelForum.com |
h2 (30), c1(33)--split- c1(30) -d1(3)
to:Bob Phillips
hoop you could send me something. it's tobad i can't send a pm to yo |
All times are GMT +1. The time now is 07:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com