$$Excel-Macros$$ Re: Want to get your question answered quickly?

2016-10-06 Thread simon templer

>
> Dim Seconds As  Long 
> Dim Minutes As  Long 
> Dim CurrentRow As  Long 
> Dim CurrentColumn As  Long 
> Dim Initalised As Boolean 
>  
> Private Sub Recalc() 
> If (CurrentRow <> 0 And CurrentColumn <> 0) Then 
> Cells(CurrentRow, CurrentColumn).Value = Format(Now, "dd/mm/yy") 
> Cells(CurrentRow, CurrentColumn+1).Value = Format(Time, "hh:mm:ss 
> AM/PM") 
>  
> Seconds = Seconds + 1 
>  
> If (Seconds = 60) Then
> Randomize
> Cells(currentrow, currentcolumn+2).value= rnd*7
> Randomize
> Cells(currentrow, currentcolumn+3).value= (rnd*7)+1
> Randomize
> Cells(currentrow, currentcolumn+4).value= (rnd*7)+2 
> Minutes = Minutes + 1 
> CurrentRow = CurrentRow + 1 
> Seconds = 0 
>  
>
> End If 
>  
>  ' Stop repeating after 24 hours (1440 minutes)
> If (Minutes < 1440) Then 
> Call SetTime 
> Else 
> Initalised = False 
> End If 
> End If 
> End Sub 
>  
> Sub SetTime() 
> If (Not Initalised) Then 
> Initalised = True 
>  
>  ' Initialise variables.
> Seconds = 0 
> Minutes = 0 
> CurrentRow = ActiveCell.Row 
> CurrentColumn = ActiveCell.Column 
> End If 
>  
> SchedRecalc = Now + TimeValue("00:00:01") 
> Application.OnTime SchedRecalc, "Recalc" 
> End Sub 
>
>
>
>
>
>
> The requirement supposed to be Cell C1 should be a randomized number 
> between 0 and 7. Cell D1 should show a randomized number between (greater 
> than the value in Cell C1) and 8. Cell E1 should show a randomized number 
> between (greater than the value in the Cell D1) and 9. This way it will not 
> show any repeated numbers in any of the cells. All numbers should show as 
> whole numbers and this continue all the way to Cells C1440, D1440 and E1440 
> where Cells C1440,D1440 and E1440 should not repeated(same) numbers.
>
> The current VBA programme once a while is actually showing repeated 
> numbers in Cells C1,D1and E1.
>

   Thanks.



-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


Re: $$Excel-Macros$$ Re: Want to get your question answered quickly?

2014-11-24 Thread Paul Schreiner
You misspelled Change in Worksheet_Change
??
 
If you use the Wizard in VBE it would avoid this:
(top-left pulldown to select Worksheet, top-right pulldown to select Change)
 
also, might I suggest using something like:
 
Private Sub Worksheet_change(ByVal Target As Excel.Range)

Dim Targ As Range
Dim rChange As Range
On Error GoTo ErrHandler
Set rChange = Intersect(Target, Range(A:A))
For Each Targ In Target
If (Targ.Value  ) Then
Application.EnableEvents = False
With Targ.Offset(0, 1)
.Value = Now
.NumberFormat = hh:mm:ss
End With
Else
Application.EnableEvents = False
Targ.Offset(0, 1).Clear
End If
Next Targ
ExistHandler:
Application.EnableEvents = True
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume ExistHandler
End Sub


Paul
-
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-

 From: Steve st-pierre stpierre.ste...@gmail.com
To: excel-macros@googlegroups.com 
Sent: Saturday, November 22, 2014 9:46 PM
Subject: $$Excel-Macros$$ Re: Want to get your question answered quickly?
  


How could get this micro to work in excel. The macro should write the time in 
one row (Row A - field 1) when something is written in the second row (Row B - 
field 2). When I add this to any excel (Excel on mac 14.4.6) file I don't even 
get any errors. Could someone help me to tell me why it doesn't work ?


Thank you,


Steve



Private Sub Worksheet_chage(ByVal Target As Excel.Range)
Dim rCell As Range
Dim rChange As Range

On Error GoTo ErrHandler
Set rChange = Intersect(Target, Range(A:A))
If Not rChange Is Nothing Then
Application.EnableEvents = False
For Each rCell In rChange
If rCellThen
With rCell.Offset(0, 1)
.Value = Now
.NumberFormat = hh:mm:ss
End With
Else
rCell.Offset(0, 1).Clear
End If
Next
End If


ExistHandler:
Set rCell = Nothing
Set rChange = Nothing
Application.EnableEvents = True
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume ExistHandler
End Sub


Le samedi 3 novembre 2012 03:34:25 UTC-4, Ayush Jain a écrit :

Dearmembers,

If you keep below points in mind while asking your query, The chances to get 
answered is just high :

  1. Ensure your question is not too vague. Don't assume anyone is 
 familiar with your problem. While you can 
upload  small attachments, describe your problem in the body of the 
post. We  are fortunate to have several Excel gurus, but few 
mind-readers.
  2. On the other hand, skip irrelevant details. Be descriptive  and 
 concise. Short, direct, and to-the-point questions 
with apt thread  titles are almost always answered promptly.
  3. Keep the scope reasonably narrow. Questions like, How do I set up 
 an accounting system in Excel? might be a long time waiting.
  4. Explain what you've already tried. (Calculation is set to 
 automatic, but formulas still don't compute) so helpers don't waste your 
 time or theirs.
  5. Post a WORKBOOK. Nobody wants to type data from a picture or  paste 
 text from your post 
into a spreadsheet as a prelude to helping. To attache a file, You can 
email them as attachments to your group's email address 
excel-...@googlegroups.com OR Simply Attach a file during posting in New 
Google Groups.
  6. If your question has not been answered within a day, consider adding 
  another post with any additional information you believe is relevant. 
  7. Use {} from the post menu to highlight the syntax
Many Thanks
Keep Posting,
-Ayush Jain(Group Manager)











-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel
 
FORUM RULES
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
 
NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To unsubscribe from this group and stop receiving emails from

$$Excel-Macros$$ Re: Want to get your question answered quickly?

2014-11-22 Thread Steve st-pierre
How could get this micro to work in excel. The macro should write the time 
in one row (Row A - field 1) when something is written in the second row 
(Row B - field 2). When I add this to any excel (Excel on mac 14.4.6) file 
I don't even get any errors. Could someone help me to tell me why it 
doesn't work ?

Thank you,

Steve

Private Sub Worksheet_chage(ByVal Target As Excel.Range)
Dim rCell As Range
Dim rChange As Range

On Error GoTo ErrHandler
Set rChange = Intersect(Target, Range(A:A))
If Not rChange Is Nothing Then
Application.EnableEvents = False
For Each rCell In rChange
If rCellThen
With rCell.Offset(0, 1)
.Value = Now
.NumberFormat = hh:mm:ss
End With
Else
rCell.Offset(0, 1).Clear
End If
Next
End If

ExistHandler:
Set rCell = Nothing
Set rChange = Nothing
Application.EnableEvents = True
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume ExistHandler
End Sub


Le samedi 3 novembre 2012 03:34:25 UTC-4, Ayush Jain a écrit :


 Dear members,

 If you keep below points in mind while asking your query, The chances to 
 get answered is just high :

1. *Ensure your question is not too vague.* Don't assume anyone is 
familiar with your problem. While you can upload small attachments, 
describe your problem in the body of the post. We are fortunate to have 
several Excel gurus, but few mind-readers.
2. *On the other hand, skip irrelevant details.* Be descriptive and 
concise. Short, direct, and to-the-point questions with apt thread titles 
are almost always answered promptly.
3. *Keep the scope reasonably narrow.* Questions like, How do I set 
up an accounting system in Excel? might be a long time waiting.
4. *Explain what you've already tried.* (Calculation is set to 
automatic, but formulas still don't compute) so helpers don't waste your 
time or theirs.
5. *Post a WORKBOOK.* Nobody wants to type data from a picture or 
paste text from your post into a spreadsheet as a prelude to helping. To 
attache a file, You can email them as attachments to your group's email 
address excel-...@googlegroups.com javascript: OR Simply Attach a 
file during posting in New Google Groups.
6. If your question has not been answered within a day, consider 
adding another post with any additional information you believe is 
relevant. 
7. Use {} from the post menu to *high**light the syntax*

 Many Thanks

 Keep Posting,

 -Ayush Jain(Group Manager)








-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


$$Excel-Macros$$ Re: Want to get your question answered quickly?

2013-10-26 Thread Howard Rambin
Not sure that this is place to ask questions but

I can record a macro in excel 2010 to print, with a selected range, but 
when I try to record one that does that but then goes beyond to select 
printer, orientation etc., it bombs

On Saturday, November 3, 2012 2:34:25 AM UTC-5, Ayush Jain wrote:


 Dear members,

 If you keep below points in mind while asking your query, The chances to 
 get answered is just high :

1. *Ensure your question is not too vague.* Don't assume anyone is 
familiar with your problem. While you can upload small attachments, 
describe your problem in the body of the post. We are fortunate to have 
several Excel gurus, but few mind-readers.
2. *On the other hand, skip irrelevant details.* Be descriptive and 
concise. Short, direct, and to-the-point questions with apt thread titles 
are almost always answered promptly.
3. *Keep the scope reasonably narrow.* Questions like, How do I set 
up an accounting system in Excel? might be a long time waiting.
4. *Explain what you've already tried.* (Calculation is set to 
automatic, but formulas still don't compute) so helpers don't waste your 
time or theirs.
5. *Post a WORKBOOK.* Nobody wants to type data from a picture or 
paste text from your post into a spreadsheet as a prelude to helping. To 
attache a file, You can email them as attachments to your group's email 
address excel-...@googlegroups.com javascript: OR Simply Attach a 
file during posting in New Google Groups.
6. If your question has not been answered within a day, consider 
adding another post with any additional information you believe is 
relevant. 
7. Use {} from the post menu to *high**light the syntax*

 Many Thanks

 Keep Posting,

 -Ayush Jain(Group Manager)








-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.


$$Excel-Macros$$ Re: Want to get your question answered quickly?

2013-05-14 Thread sreenivas kammari
Hi all, 
 
I'm very much confused how to post and where to post my questions?...I need 
a small help but its very urgent... 
 
I need a macro for the below mentioned problem. 
 
Say for example: 
I have a column A and B in a sheet. 
In column A say I have 1,2,3,4,5, and 
in column B say I have A.b.c.d.e against each
I need a Macro it should read 1 and search for the sheet name 1 if it is 
available then search for sheet Name A if both are available copy data 
from sheet 1 to sheet A. Do this for all the rows while checking both 
columns for all the sheets.
 
 
I need this very urgent... please help me.
 
Thank you,
Srini

On Saturday, November 3, 2012 1:04:25 PM UTC+5:30, Ayush Jain wrote: 


 Dear members,

 If you keep below points in mind while asking your query, The chances to 
 get answered is just high :

1. *Ensure your question is not too vague.* Don't assume anyone is 
familiar with your problem. While you can upload small attachments, 
describe your problem in the body of the post. We are fortunate to have 
several Excel gurus, but few mind-readers. 
2. *On the other hand, skip irrelevant details.* Be descriptive and 
concise. Short, direct, and to-the-point questions with apt thread titles 
are almost always answered promptly. 
3. *Keep the scope reasonably narrow.* Questions like, How do I set 
up an accounting system in Excel? might be a long time waiting. 
4. *Explain what you've already tried.* (Calculation is set to 
automatic, but formulas still don't compute) so helpers don't waste your 
time or theirs. 
5. *Post a WORKBOOK.* Nobody wants to type data from a picture or 
paste text from your post into a spreadsheet as a prelude to helping. To 
attache a file, You can email them as attachments to your group's email 
address excel-...@googlegroups.com javascript: OR Simply Attach a 
file during posting in New Google Groups. 
6. If your question has not been answered within a day, consider 
adding another post with any additional information you believe is 
relevant. 
7. Use {} from the post menu to *high**light the syntax*

 Many Thanks

 Keep Posting,

 -Ayush Jain(Group Manager)








-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.