#1   Report Post  
Posted to microsoft.public.excel.misc
Need help with sumif
 
Posts: n/a
Default Help with VBA

I need to to this with VBA

A1=randbetween(1,100)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Help with VBA

Hi Need help with sumif,

Try:

'=============
Private Sub CommandButton1_Click()
Me.Range("A1").Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman



"Need help with sumif" wrote
in message ...
I need to to this with VBA

A1=randbetween(1,100)



  #3   Report Post  
Posted to microsoft.public.excel.misc
Need help with sumif
 
Posts: n/a
Default Help with VBA

Thanks it works great when you get a chance can you explain me what

Me.cells(3,3) is for?

"Norman Jones" wrote:

Hi Need help with sumif,

Try:

'=============
Private Sub CommandButton1_Click()
Me.Range("A1").Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman



"Need help with sumif" wrote
in message ...
I need to to this with VBA

A1=randbetween(1,100)




  #4   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Help with VBA

Hi Need help with sumif,

Thanks it works great when you get a chance can you explain me what
Me.cells(3,3) is for?


Since the (CommandButton) code is in a worksheet module, Me refers to the
worksheet holding the code.

Cells(3.3) is equivalent to Range("C3") and was used because you specified
it:

I'm sorry what I meant was Cells(3,3) = randbetween(1,100)



---
Regards,
Norman


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Help with VBA



"Norman Jones" wrote:

Hi Need help with sumif,

Thanks it works great when you get a chance can you explain me what
Me.cells(3,3) is for?


Since the (CommandButton) code is in a worksheet module, Me refers to the
worksheet holding the code.

Cells(3.3) is equivalent to Range("C3") and was used because you specified
it:

I'm sorry what I meant was Cells(3,3) = randbetween(1,100)



---
Regards,
Norman





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Help with VBA



"Need help with sumif" wrote:

Thanks it works great when you get a chance can you explain me what

Me.cells(3,3) is for?

"Norman Jones" wrote:

Hi Need help with sumif,

Try:

'=============
Private Sub CommandButton1_Click()
Me.Range("A1").Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman



"Need help with sumif" wrote
in message ...
I need to to this with VBA

A1=randbetween(1,100)




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Help with VBA



"Norman Jones" wrote:

Hi Need help with sumif,

Try:

'=============
Private Sub CommandButton1_Click()
Me.Range("A1").Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman



"Need help with sumif" wrote
in message ...
I need to to this with VBA

A1=randbetween(1,100)




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Help with VBA



"Need help with sumif" wrote:

I need to to this with VBA

A1=randbetween(1,100)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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



All times are GMT +1. The time now is 04:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"