Move Text Up
Hi Greg,
You could find your posts doing a Google Groups search.
Your original post received the following responses from Rob van Gelder and
Bob Phillips:
================================
"Rob van Gelder" wrote in message
...
Does your code work?
ClearContents is a method, but it looks like you've made a variable called
ClearContents.
The usual syntax is rng1.Offset(0, 5).ClearContents
To move the values from the row after, eg.
rng1.Offset(0, 5).Value = rng1.Offset(1, 5).Value
PS. What are you Blending?
================================
wrote in message
...
Greg,
I think this is what you mean
Dim rng As Range, res As Variant, rng1 As Range
Set rng = Worksheets("Blend Sheet").Range("b8:b23")
res = Application.Match(CStr(ComboBox1.Text), rng, 0)
If Not IsError(res) Then
Set rng1 = rng(res)
rng1.Offset(0, 5).Delete Shift:=xlUp
rng1.Offset(0, 0).Delete Shift:=xlUp
--
HTH
================================
---
Regards,
Norman
"gregork" wrote in message
...
I am very sorry to have to post this again but after I posted it the first
time I was unable to download any new messages for about three days. I'm
not
sure what happened but even now, when I reset the newsgroup and
re-download
all the past couple of weeks worth of messages, my original posting has
disappeared..so here we go again:
I have the following code for deleting an entry on a worksheet:
Dim rng As Range, res As Variant, rng1 As Range
Set rng = Worksheets("Blend Sheet").Range("b8:b23")
res = Application.Match(CStr(ComboBox1.Text), rng, 0)
If Not IsError(res) Then
Set rng1 = rng(res)
rng1.Offset(0, 5).Value = ClearContents
rng1.Offset(0, 0).Value = ClearContents
What do I need to add to the code to move up the entries in the cells
below
the entry I am deleting and within the range ?
Bear in mind I have different data in the cells below B23 so I can't have
the text in those cells move up.
Greg
|