PC Review


Reply
Thread Tools Rate Thread

#1 How to best learn VBA? #2 Division problem question

 
 
Hrundi V. Bakshi
Guest
Posts: n/a
 
      21st Dec 2006
I'm continually frustrated in trying to learn VBA to do some things
which I think would be useful tools (well, for myself anyway).

I'm not bright, but MS Office is certainly not new to me.
I do want to learn VBA, more than anything, at this point, instead of
relying on your peoples' wonderful help. And I do mean wonderful, as
I've gotten lots of good answers here, but I hate being bothersome.

But, I cannot for the life of me figure out the code to do a simple
division program, as follows.


Row A contains the values 1 to 100 (each number in its own cell).

In the code, I want each of the Row A numbers to be tested if:

If the number from Row A = or ends in 0, 2, 5 Then go to the next
number in sequence.

If the number does not end in 0, 2, or 5. , but is > 2
Then divide it by 3.

If the answer leaves a remainder, then put that answer in Row C,
starting from the left-most column. Then, on to the next number in
Row A, and test, and divide and so on to 100.

I've long wished I had some of you folks ability to whip up these
programs on the fly.

Please help

 
Reply With Quote
 
 
 
 
Hrundi V. Bakshi
Guest
Posts: n/a
 
      22nd Dec 2006
Hi, I appreciate everyone trying to help.

If left to me to program, it simply won't happen..
So could someone please point me to a prime number calculator written
for Excel VBA ? That's all I'm looking for (at this time).

Thanks,
Hrundi
 
Reply With Quote
 
John Bundy
Guest
Posts: n/a
 
      22nd Dec 2006
Had to build a couple back in school, how large of a number are you needing?


--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"Hrundi V. Bakshi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi, I appreciate everyone trying to help.
>
> If left to me to program, it simply won't happen..
> So could someone please point me to a prime number calculator written
> for Excel VBA ? That's all I'm looking for (at this time).
>
> Thanks,
> Hrundi



 
Reply With Quote
 
George C.
Guest
Posts: n/a
 
      23rd Dec 2006
On Fri, 22 Dec 2006 15:29:28 -0600, "John Bundy"
<(E-Mail Removed)> wrote:

>Had to build a couple back in school, how large of a number are you needing?


Hi. I found one on the Microsoft site, after extensive searching
around.

It starts with two dialogue boxes for first integer and final integer.
It's MUCH more simpler than the concoction I had in mind.

BUT I still have a question.

I generates the primes, and goes down column A as it posts each prime
found. But, I'd like the page to scroll down, along with each new
prime that is entered.

I found this command, but cant get it to work:

ScrollActionLineDown(0,1)

Please advise.

Thanks, once again


>
>
>--
>--
>-John
>Please rate when your question is answered to help us and others know what
>is helpful.
>
>"Hrundi V. Bakshi" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> Hi, I appreciate everyone trying to help.
>>
>> If left to me to program, it simply won't happen..
>> So could someone please point me to a prime number calculator written
>> for Excel VBA ? That's all I'm looking for (at this time).
>>
>> Thanks,
>> Hrundi

>
>


 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      23rd Dec 2006
Sub ABCD()
Range("A1").Select
For i = 1 To 50
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = i
'Application.Wait Now() + TimeValue("00:00:01")
Next
End Sub


Uncomment the application.Wait if you want it to SLOW DOWN.

didn't see any division problem question.

--
Regards,
Tom Ogilvy


"George C." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Fri, 22 Dec 2006 15:29:28 -0600, "John Bundy"
> <(E-Mail Removed)> wrote:
>
>>Had to build a couple back in school, how large of a number are you
>>needing?

>
> Hi. I found one on the Microsoft site, after extensive searching
> around.
>
> It starts with two dialogue boxes for first integer and final integer.
> It's MUCH more simpler than the concoction I had in mind.
>
> BUT I still have a question.
>
> I generates the primes, and goes down column A as it posts each prime
> found. But, I'd like the page to scroll down, along with each new
> prime that is entered.
>
> I found this command, but cant get it to work:
>
> ScrollActionLineDown(0,1)
>
> Please advise.
>
> Thanks, once again
>
>
>>
>>
>>--
>>--
>>-John
>>Please rate when your question is answered to help us and others know what
>>is helpful.
>>
>>"Hrundi V. Bakshi" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed)...
>>> Hi, I appreciate everyone trying to help.
>>>
>>> If left to me to program, it simply won't happen..
>>> So could someone please point me to a prime number calculator written
>>> for Excel VBA ? That's all I'm looking for (at this time).
>>>
>>> Thanks,
>>> Hrundi

>>
>>

>



 
Reply With Quote
 
Dana DeLouis
Guest
Posts: n/a
 
      23rd Dec 2006
> ...I'd like the page to scroll down, along with each new Prime.

Are you referring to this kb article?
http://support.microsoft.com/kb/202782/en-us


This is not the best, but something quick n dirty:

Change:
ActiveCell.Offset(Count, 0).Value = y

To:
If Count > 10 Then _
Application.Goto Cells(Count - 10, 1), True
Cells(Count, 1).Value = y


and change to this at the beginning:
Count = 1

Again, this is not the best, but it may give you some ideas.

--
HTH :>)
Dana DeLouis
Windows XP & Office 2003


"George C." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Fri, 22 Dec 2006 15:29:28 -0600, "John Bundy"
> <(E-Mail Removed)> wrote:
>
>>Had to build a couple back in school, how large of a number are you
>>needing?

>
> Hi. I found one on the Microsoft site, after extensive searching
> around.
>
> It starts with two dialogue boxes for first integer and final integer.
> It's MUCH more simpler than the concoction I had in mind.
>
> BUT I still have a question.
>
> I generates the primes, and goes down column A as it posts each prime
> found. But, I'd like the page to scroll down, along with each new
> prime that is entered.
>
> I found this command, but cant get it to work:
>
> ScrollActionLineDown(0,1)
>
> Please advise.
>
> Thanks, once again
>
>
>>
>>
>>--
>>--
>>-John
>>Please rate when your question is answered to help us and others know what
>>is helpful.
>>
>>"Hrundi V. Bakshi" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed)...
>>> Hi, I appreciate everyone trying to help.
>>>
>>> If left to me to program, it simply won't happen..
>>> So could someone please point me to a prime number calculator written
>>> for Excel VBA ? That's all I'm looking for (at this time).
>>>
>>> Thanks,
>>> Hrundi

>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Division Question shane Microsoft Access 8 28th Nov 2009 07:10 AM
Division Question Gary F Shelton Microsoft Access Queries 1 24th Feb 2009 04:42 AM
Division Question TisMe Microsoft C# .NET 9 11th Feb 2008 07:59 PM
Division Question =?Utf-8?B?U2hlcndvb2Q=?= Microsoft Access VBA Modules 1 30th Nov 2005 01:59 AM
Passmark Performance Test, Division, Floating Point Division, 2DShapes @(none) Computer Hardware 0 19th Aug 2004 11:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:07 AM.