Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default fill down to next change in value

(i certainly hope there is no limit as to the number of questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN C COLUMN D
---------------------------------------------------------------------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE: 1.588 88,395.18
200204 22 EXCHANGE RATE: 1.582 89,873.48
200205 22 EXCHANGE RATE: 1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE: 1.588 88,395.18
200204 22 EXCHANGE RATE: 1.582 89,873.48
200205 22 EXCHANGE RATE: 1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE: 1.588 88,395.18
200204 22 EXCHANGE RATE: 1.582 89,873.48
200205 22 EXCHANGE RATE: 1.551 90,590.98

COLUMN C is currently formatted in "general" format...i could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text with the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next number (ie..42010108)
- then carry down the next number (42010108) until it reaches the next
number (42010109)
- then carry down the next number (42010109) until it reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with the, in this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with which you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner level at best!

appreciate any assistance you can provide...

thanks..sandi


  #2   Report Post  
Posted to microsoft.public.excel.programming
rog rog is offline
external usenet poster
 
Posts: 39
Default fill down to next change in value

Sandi, this should do what you want, as long as there are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the number of

questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is

currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN

C COLUMN D
----------------------------------------------------------

-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98

COLUMN C is currently formatted in "general" format...i

could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text with

the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next

number (ie..42010108)
- then carry down the next number (42010108) until it

reaches the next
number (42010109)
- then carry down the next number (42010109) until it

reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with the, in

this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with which

you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner

level at best!

appreciate any assistance you can provide...

thanks..sandi


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default fill down to next change in value

Hi Rog - thanks for your reply

pls pardon my lack of vba knowledge...

i copied the code beginning with Dim rngCell As Range....to...Wend into my

current sub module...is that OK?

then i ran the code and rec'd a "TYPE MISMATCH" error at the following

execution:

lngLastNum = CLng(rngCell.Value)

not sure what it means or how to correct...

sandi

"Rog" wrote in message
...
Sandi, this should do what you want, as long as there are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the number of

questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is

currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN

C COLUMN D
----------------------------------------------------------

-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98

COLUMN C is currently formatted in "general" format...i

could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text with

the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next

number (ie..42010108)
- then carry down the next number (42010108) until it

reaches the next
number (42010109)
- then carry down the next number (42010109) until it

reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with the, in

this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with which

you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner

level at best!

appreciate any assistance you can provide...

thanks..sandi


.



  #4   Report Post  
Posted to microsoft.public.excel.programming
rog rog is offline
external usenet poster
 
Posts: 39
Default fill down to next change in value

It's trying to convert the value in cell C1 to a "long"
numeric type. Change C1 to the first cell in column C
which contains a number, and it shoud be fine

Rgds

Rog

-----Original Message-----
Hi Rog - thanks for your reply

pls pardon my lack of vba knowledge...

i copied the code beginning with Dim rngCell As

Range....to...Wend into my

current sub module...is that OK?

then i ran the code and rec'd a "TYPE MISMATCH" error at

the following

execution:

lngLastNum = CLng(rngCell.Value)

not sure what it means or how to correct...

sandi

"Rog" wrote in

message
...
Sandi, this should do what you want, as long as there

are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the number of

questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is

currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN

C COLUMN D
-------------------------------------------------------

---
-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:

1.588 88,395.18
200204 22 EXCHANGE RATE:

1.582 89,873.48
200205 22 EXCHANGE RATE:

1.551 90,590.98

COLUMN C is currently formatted in "general" format...i

could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text

with
the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next

number (ie..42010108)
- then carry down the next number (42010108) until it

reaches the next
number (42010109)
- then carry down the next number (42010109) until it

reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with the,

in
this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with which

you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner

level at best!

appreciate any assistance you can provide...

thanks..sandi


.



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default THANKS! fill down to next change in value

Hi Rog...many thank you's...c1 contained a heading, which i changed to a
number value...and it works fine now!
HAVE A GREAT DAY!
sandi

"Rog" wrote in message
...
It's trying to convert the value in cell C1 to a "long"
numeric type. Change C1 to the first cell in column C
which contains a number, and it shoud be fine

Rgds

Rog

-----Original Message-----
Hi Rog - thanks for your reply

pls pardon my lack of vba knowledge...

i copied the code beginning with Dim rngCell As

Range....to...Wend into my

current sub module...is that OK?

then i ran the code and rec'd a "TYPE MISMATCH" error at

the following

execution:

lngLastNum = CLng(rngCell.Value)

not sure what it means or how to correct...

sandi

"Rog" wrote in

message
...
Sandi, this should do what you want, as long as there

are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the number of
questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is
currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN
C COLUMN D
-------------------------------------------------------

---
-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98

COLUMN C is currently formatted in "general" format...i
could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text

with
the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next
number (ie..42010108)
- then carry down the next number (42010108) until it
reaches the next
number (42010109)
- then carry down the next number (42010109) until it
reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with the,

in
this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with which
you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner
level at best!

appreciate any assistance you can provide...

thanks..sandi


.



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default OOPS! b/o error - fill down to next change in value

hi rog - me again...
oh oh...i've been making some changes, and now i get a BUFFER OVERFLOW ERROR
when it gets to line 5 ??
-----------------------------------------------------------------------
debugging shows the following values for;
lngLastNum = 42010101
CLng(rngCell.Value) = 4201010101
-----------------------------------------------------------------------
Cell C1 has the following value: 4201
the next value encountered is: 42010101 - and it fills down correctly
next value encountered is: 4201010101 - that's when the b/o error occurs
------------------------------------------------------------------------
ACTUAL CODE
line
1 ' FILLDOWN TERRITORY NUMBERS
2 Dim rngCell As Range
3 Dim lngLastNum As Long

4 Set rngCell = Range("C1")
5 lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend
---------------------------------------------------------------
APPRECIATE YOUR ASSISTANCE - AS ALWAYS!
Sandi



"Rog" wrote in message
...
It's trying to convert the value in cell C1 to a "long"
numeric type. Change C1 to the first cell in column C
which contains a number, and it shoud be fine

Rgds

Rog

-----Original Message-----
Hi Rog - thanks for your reply

pls pardon my lack of vba knowledge...

i copied the code beginning with Dim rngCell As

Range....to...Wend into my

current sub module...is that OK?

then i ran the code and rec'd a "TYPE MISMATCH" error at

the following

execution:

lngLastNum = CLng(rngCell.Value)

not sure what it means or how to correct...

sandi

"Rog" wrote in

message
...
Sandi, this should do what you want, as long as there

are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the number of
questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is
currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN
C COLUMN D
-------------------------------------------------------

---
-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98

COLUMN C is currently formatted in "general" format...i
could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text

with
the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next
number (ie..42010108)
- then carry down the next number (42010108) until it
reaches the next
number (42010109)
- then carry down the next number (42010109) until it
reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with the,

in
this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with which
you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner
level at best!

appreciate any assistance you can provide...

thanks..sandi


.



.



  #7   Report Post  
Posted to microsoft.public.excel.programming
rog rog is offline
external usenet poster
 
Posts: 39
Default OOPS! b/o error - fill down to next change in value

Ok, the number is too big for a long data type. We'll just
change it to a double :

Dim rngCell As Range
Dim dblLastNum As Double

Set rngCell = Range("C1")

dblLastNum = Cdbl(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
dblLastNum = rngCell.Value
Else
rngCell.Value = dblLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend


Rgds

Rog



-----Original Message-----
hi rog - me again...
oh oh...i've been making some changes, and now i get a

BUFFER OVERFLOW ERROR
when it gets to line 5 ??
----------------------------------------------------------

-------------
debugging shows the following values for;
lngLastNum = 42010101
CLng(rngCell.Value) = 4201010101
----------------------------------------------------------

-------------
Cell C1 has the following value: 4201
the next value encountered is: 42010101 - and it fills

down correctly
next value encountered is: 4201010101 - that's when the

b/o error occurs
----------------------------------------------------------

--------------
ACTUAL CODE
line
1 ' FILLDOWN TERRITORY NUMBERS
2 Dim rngCell As Range
3 Dim lngLastNum As Long

4 Set rngCell = Range("C1")
5 lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend
----------------------------------------------------------

-----
APPRECIATE YOUR ASSISTANCE - AS ALWAYS!
Sandi



"Rog" wrote in

message
...
It's trying to convert the value in cell C1 to a "long"
numeric type. Change C1 to the first cell in column C
which contains a number, and it shoud be fine

Rgds

Rog

-----Original Message-----
Hi Rog - thanks for your reply

pls pardon my lack of vba knowledge...

i copied the code beginning with Dim rngCell As

Range....to...Wend into my

current sub module...is that OK?

then i ran the code and rec'd a "TYPE MISMATCH" error

at
the following

execution:

lngLastNum = CLng(rngCell.Value)

not sure what it means or how to correct...

sandi

"Rog" wrote in

message
...
Sandi, this should do what you want, as long as there

are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the

number of
questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is
currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN
C COLUMN D
----------------------------------------------------

---
---
-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98

COLUMN C is currently formatted in "general"

format...i
could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text

with
the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next
number (ie..42010108)
- then carry down the next number (42010108) until

it
reaches the next
number (42010109)
- then carry down the next number (42010109) until

it
reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with

the,
in
this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with

which
you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner
level at best!

appreciate any assistance you can provide...

thanks..sandi


.



.



.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default PURRFECT!: OOPS! b/o error - fill down to next change in value

oh, thank you AGAIN AND AGAIN!!
it worked!

"Rog" wrote in message
...
Ok, the number is too big for a long data type. We'll just
change it to a double :

Dim rngCell As Range
Dim dblLastNum As Double

Set rngCell = Range("C1")

dblLastNum = Cdbl(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
dblLastNum = rngCell.Value
Else
rngCell.Value = dblLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend


Rgds

Rog



-----Original Message-----
hi rog - me again...
oh oh...i've been making some changes, and now i get a

BUFFER OVERFLOW ERROR
when it gets to line 5 ??
----------------------------------------------------------

-------------
debugging shows the following values for;
lngLastNum = 42010101
CLng(rngCell.Value) = 4201010101
----------------------------------------------------------

-------------
Cell C1 has the following value: 4201
the next value encountered is: 42010101 - and it fills

down correctly
next value encountered is: 4201010101 - that's when the

b/o error occurs
----------------------------------------------------------

--------------
ACTUAL CODE
line
1 ' FILLDOWN TERRITORY NUMBERS
2 Dim rngCell As Range
3 Dim lngLastNum As Long

4 Set rngCell = Range("C1")
5 lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend
----------------------------------------------------------

-----
APPRECIATE YOUR ASSISTANCE - AS ALWAYS!
Sandi



"Rog" wrote in

message
...
It's trying to convert the value in cell C1 to a "long"
numeric type. Change C1 to the first cell in column C
which contains a number, and it shoud be fine

Rgds

Rog

-----Original Message-----
Hi Rog - thanks for your reply

pls pardon my lack of vba knowledge...

i copied the code beginning with Dim rngCell As
Range....to...Wend into my

current sub module...is that OK?

then i ran the code and rec'd a "TYPE MISMATCH" error

at
the following

execution:

lngLastNum = CLng(rngCell.Value)

not sure what it means or how to correct...

sandi

"Rog" wrote in
message
...
Sandi, this should do what you want, as long as there
are
no empty cells in column C

Sub c()

Dim rngCell As Range
Dim lngLastNum As Long

Set rngCell = Range("C1")
lngLastNum = CLng(rngCell.Value)

While Not IsEmpty(rngCell)
If IsNumeric(rngCell.Value) Then
lngLastNum = rngCell.Value
Else
rngCell.Value = lngLastNum
End If
Set rngCell = rngCell.Offset(1)
Wend

End Sub


Rgds

Rog

-----Original Message-----
(i certainly hope there is no limit as to the

number of
questions one can
ask! - so here we go again!)
below is a snipet of my database (note database is
currently at 1000 records
or so, and can vary in length):

COL A COL B COLUMN
C COLUMN D
----------------------------------------------------

---
---
-----------------
SEQ: T ERRI 42010107
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010108
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98
SEQ: T ERRI 42010109
FALSE
200203 21 EXCHANGE RATE:
1.588 88,395.18
200204 22 EXCHANGE RATE:
1.582 89,873.48
200205 22 EXCHANGE RATE:
1.551 90,590.98

COLUMN C is currently formatted in "general"

format...i
could change to
NUMBER format if req'd...
my goal is to replace the "exchange rate:....." text
with
the territory
numbers (ie..42010107, 42010108, 42010109)

i am looking for some code that will, for example,
- carry down the 42010107 until it reaches the next
number (ie..42010108)
- then carry down the next number (42010108) until

it
reaches the next
number (42010109)
- then carry down the next number (42010109) until

it
reaches the next
number
- until the end, where there is no values

i want to replace the text "EXCHANGE RATE:" with

the,
in
this case,
territory numbers (eg. 42010107, 42010108, 42010109)

i only hope i am explaining this in a manner with

which
you seasoned
professionals can understand!!
oh - and keep in mind, my vba skills are at beginner
level at best!

appreciate any assistance you can provide...

thanks..sandi


.



.



.



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill down empty cells at every change in value Rose Excel Worksheet Functions 4 March 24th 09 03:03 PM
How to Automatically Change Fill Colors Daniel Bunt Excel Discussion (Misc queries) 4 October 28th 08 12:51 PM
Using logic to change the fill in a cell JohnHaslam Excel Discussion (Misc queries) 3 December 19th 05 12:33 PM
Auto fill color change Dave Excel Discussion (Misc queries) 4 June 15th 05 05:45 PM
Default fill color change Cheyenne Excel Discussion (Misc queries) 2 December 15th 04 01:12 AM


All times are GMT +1. The time now is 05:25 AM.

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"