manipulating data from one text box to another

john doe the 3rd

New Member
Joined
Mar 13, 2004
Messages
47
hi guys im having some trouble with a form and need some vb to carry out this specific function.


i have a text box, that is blank
i have another text box which has some code behind it which works out some units for me, but im having some trouble getting this information, manipulating it and placing it into the blank text box. example:


text box 1 has some information - the number of "credits" achieved by astudent over a term.

text box 2 is blank .

i would like text box 2 to divide the value of text box 1 by 10 and place the answer in itself , so now text box 2 has the answer to textbox1 / 10

but.. i ONLY want textbox 2 to divide the value of textbox 1 by 10 when the value of textbox 1 is a multiple of 360. so thats 360, 720, 1080 etc.



thanks. :eek:
 
Hi, try this instead :

[edited]
=Int( [text1]/360 ) * 36

HTH, Andrew. :)
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You could try:
=[text1]\360
The backslach operator shows only the INTEGER portion of the division.

Denis
 
Upvote 0
Hi Denis - the more I read your posts the more I realise I don't know. Are there any other double operators like the backslash?

Apologies for hijacking your thread john doe #3.

BTW, I used the x 36 part to make the number the same "value" as the previous request (i.e. a multiple of 36).

Andrew :)
 
Upvote 0
Hi Andrew, thanks for the compliment. Your posts have taught me a few tricks too :)
As far as I know, VBA (and Access) support 3 types of division; standard (/), modulo (Mod) and backslash (\). So you get the whole result, the remainder or the integer portion, respectively.
In Excel you have standard division and the MOD function but if you want to use the backslash, you need to go to VBA.
Dunno about you, but I love this Board. Even when I'm too busy to post replies, I browse around for tips and new approaches. I've learnt heaps -- there are some serious gurus around here!

Cheers
Denis
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,248
Members
451,756
Latest member
tommyw

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