I am trying to select the first and last time and put it down in 2 columns. For this I am currently using:
' maximum tijd
'
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=R[-2]C"
'celeigenschap
Selection.NumberFormat = "h:mm"
'cel 1 naar beneden
ActiveCell.Offset(1, 0).Range("A1").Select
'
' minimum tijd
'
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=MIN(R2C:R3C)"
Selection.NumberFormat = "h:mm"
ActiveCell.Offset(1, 0).Range("A1").Select
This being part of a Macro.
However, When the first or last cells of the table are empty, I get an #Value#- mark! How do I select the first cell WITH a time in it?
When I have this right in my macro, I can finish it up! Would be great if anyone knew what to do!
thanks so much!
E
I can't get my table clear, but some columns start in A2, some start in A15 etc. Some end in A30, some end in A40 (for example)
my tables look like this:
HaltenaamRitnummers: 7001 7005 a7009 7013
Uithuizen, BusstationV 8:00 10:35
Uithuizen, Engersmastraat 8:01 10:36
Uithuizen, Hunsingoheerd 8:02 10:37
Uithuizen, Snik 8:03 10:37
Uithuizen, J Cohenstraat 8:04 10:38
Uithuizen, Wilgenbos 8:04 10:38
Uithuizen, John F Kennedylaan 8:05 10:39
Lage van de weg, Bovenhuizen 8:06 10:40
Lage van de weg, Streeksterweg 8:08 10:42
Usquert, Weg naar Lutjebos 8:10 10:43
Usquert, Sportpark 8:11 10:44
Usquert, Spoorwegovergang 8:12 10:45
Rottum, 't Lage Eind 8:16 10:49
Kantens, Kolpendestraat 8:18 10:51
Kantens, Oude Gemeentehuis 8:18 10:51
Kantens, Middelstumerweg 8:18 10:51
Middelstum, Weg naar Toornwerd 8:21 10:53
Middelstum, Brouwerslaan 8:22 10:54
Middelstum, Concordiaplein 8:23 9:57 10:55 10:57
Middelstum, Mentheda 8:23 9:57 10:57
Fraamklap, Fraamklap 8:25 9:59 10:59
Middelstum, Stitswerderweg 8:27 10:01 11:01
Onderdendam, Brug 8:28 10:02 11:02
Onderdendam, Kerk 8:28 10:02 11:02
Onderdendam, Bedumerweg 8:29 10:03 11:03
Bedum, Wroetende Mol 8:31 10:05 11:05
Bedum, Zuivelfabriek 8:32 10:06 11:06
Bedum, Wilhelminalaan 8:32 10:06 11:06
Bedum, van Heemskerckstraat 8:33 10:07 11:07
Bedum, Molenweg 8:33 10:07 11:07
Bedum, Schoolstraat 8:34 10:08 11:08
Bedum, Bedumerbos 8:36 10:10 11:10
Ellerhuizen, Brug 8:39 10:13 11:13
Zuidwolde, Plattenburg 8:40 10:14 11:14
Zuidwolde, Noordwolderweg 8:41 10:15 11:15
Zuidwolde, Gemaal 8:44 10:18 11:18
Noorderhoogebrug, Boterdiepsbrug 8:45 10:19 11:19
Groningen, Bedumerweg/Poortstraat 8:47 10:21 11:21
Groningen, Bedumerweg/Floresstraat 8:47 10:21 11:21
Groningen, Bedumerweg/Nw.Ebbingestr 8:48 10:22 11:22
Groningen, Nw Ebbingestr/Noorderplsn 8:49 10:23 11:23
Groningen, Nw Ebbingestr/Brouwerstr 8:49 10:23 11:23
Groningen, Nw Ebbingestr/Korenstraat 8:50 10:24 11:24
Groningen, Oude Ebbingestraat 8:51 10:25 11:25
Groningen, Grote Markt/Stud Soc 8:52 10:26 11:26
Groningen, Gelkingestraat 8:53 10:27 11:27
Groningen, Zuiderdiep 8:54 10:28 11:28
Groningen, Zuiderdiep/Schoolholm 8:55 10:29 11:29
Groningen, Emmaplein 8:56 10:30 11:30
Groningen, Busstation CSA 8:57 10:31 11:31
' maximum tijd
'
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=R[-2]C"
'celeigenschap
Selection.NumberFormat = "h:mm"
'cel 1 naar beneden
ActiveCell.Offset(1, 0).Range("A1").Select
'
' minimum tijd
'
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=MIN(R2C:R3C)"
Selection.NumberFormat = "h:mm"
ActiveCell.Offset(1, 0).Range("A1").Select
This being part of a Macro.
However, When the first or last cells of the table are empty, I get an #Value#- mark! How do I select the first cell WITH a time in it?
When I have this right in my macro, I can finish it up! Would be great if anyone knew what to do!
thanks so much!
E
I can't get my table clear, but some columns start in A2, some start in A15 etc. Some end in A30, some end in A40 (for example)
my tables look like this:
HaltenaamRitnummers: 7001 7005 a7009 7013
Uithuizen, BusstationV 8:00 10:35
Uithuizen, Engersmastraat 8:01 10:36
Uithuizen, Hunsingoheerd 8:02 10:37
Uithuizen, Snik 8:03 10:37
Uithuizen, J Cohenstraat 8:04 10:38
Uithuizen, Wilgenbos 8:04 10:38
Uithuizen, John F Kennedylaan 8:05 10:39
Lage van de weg, Bovenhuizen 8:06 10:40
Lage van de weg, Streeksterweg 8:08 10:42
Usquert, Weg naar Lutjebos 8:10 10:43
Usquert, Sportpark 8:11 10:44
Usquert, Spoorwegovergang 8:12 10:45
Rottum, 't Lage Eind 8:16 10:49
Kantens, Kolpendestraat 8:18 10:51
Kantens, Oude Gemeentehuis 8:18 10:51
Kantens, Middelstumerweg 8:18 10:51
Middelstum, Weg naar Toornwerd 8:21 10:53
Middelstum, Brouwerslaan 8:22 10:54
Middelstum, Concordiaplein 8:23 9:57 10:55 10:57
Middelstum, Mentheda 8:23 9:57 10:57
Fraamklap, Fraamklap 8:25 9:59 10:59
Middelstum, Stitswerderweg 8:27 10:01 11:01
Onderdendam, Brug 8:28 10:02 11:02
Onderdendam, Kerk 8:28 10:02 11:02
Onderdendam, Bedumerweg 8:29 10:03 11:03
Bedum, Wroetende Mol 8:31 10:05 11:05
Bedum, Zuivelfabriek 8:32 10:06 11:06
Bedum, Wilhelminalaan 8:32 10:06 11:06
Bedum, van Heemskerckstraat 8:33 10:07 11:07
Bedum, Molenweg 8:33 10:07 11:07
Bedum, Schoolstraat 8:34 10:08 11:08
Bedum, Bedumerbos 8:36 10:10 11:10
Ellerhuizen, Brug 8:39 10:13 11:13
Zuidwolde, Plattenburg 8:40 10:14 11:14
Zuidwolde, Noordwolderweg 8:41 10:15 11:15
Zuidwolde, Gemaal 8:44 10:18 11:18
Noorderhoogebrug, Boterdiepsbrug 8:45 10:19 11:19
Groningen, Bedumerweg/Poortstraat 8:47 10:21 11:21
Groningen, Bedumerweg/Floresstraat 8:47 10:21 11:21
Groningen, Bedumerweg/Nw.Ebbingestr 8:48 10:22 11:22
Groningen, Nw Ebbingestr/Noorderplsn 8:49 10:23 11:23
Groningen, Nw Ebbingestr/Brouwerstr 8:49 10:23 11:23
Groningen, Nw Ebbingestr/Korenstraat 8:50 10:24 11:24
Groningen, Oude Ebbingestraat 8:51 10:25 11:25
Groningen, Grote Markt/Stud Soc 8:52 10:26 11:26
Groningen, Gelkingestraat 8:53 10:27 11:27
Groningen, Zuiderdiep 8:54 10:28 11:28
Groningen, Zuiderdiep/Schoolholm 8:55 10:29 11:29
Groningen, Emmaplein 8:56 10:30 11:30
Groningen, Busstation CSA 8:57 10:31 11:31