Record time

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Sheet1

CDEFG
11 or 0Time T1 when 1 appeared last in CTime T2 when 1 disappeared last in CFor T1For T2
219/21/2014 11:039/21/2014 13:47100200
31
40
51
60

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 64px"><col style="WIDTH: 104px"><col style="WIDTH: 104px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

C2:C200 generates either of 1 or 0 using Excel function. C2:C200 gets updated regularly & the value in C2:C200 may change back from 1 to 0 after generating 1.
Say C2=1 when time=9/21/2014 10:44:36 AM. I want to record this time in D2 & a constant numerical value 100 should appear in F2.
After few seconds, C2 may change to 0. Say C2 becomes 0 at time=9/21/2014 11:16:12 AM. I want to record this time in E2 & a constant numerical value 200 should appear in G2.

By default, C2:C200=0.
How to do this in D2:G200 using vba.
Thanks in advance for having helped me.
 
In ws tab named Temp, the below code has been pasted in the standard module. This macro is probably copying data from Sheet3, the ws where the table is located.


Code:
Sub setup()
  Worksheets("Temp").Range("A2:A200").Value = Worksheets("Sheets").Range("C2:C200").Value
End Sub

you can put the macro elsewhere but some revisions to the macro is needed[/QUOTE]

Kindly re-look at the code: Should the Worksheets("Sheet[B][COLOR=#ff0000]s[/COLOR][/B]") be REPLACED BY Worksheets("Sheet[B][COLOR=#ff0000]3[/COLOR][/B]")?
Please reply back.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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