Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Addressing cells without selecting

Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize down 200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Addressing cells without selecting

Hi
is this what you're looking for??
With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1)).Clearcontents
End With


--
Regards
Frank Kabel
Frankfurt, Germany

Robert Christie wrote:
Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize down 200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Addressing cells without selecting

Hi Bob

Try this one instead:

With ActiveSheet
.Cells(.Rows.Count, "B").End(xlUp). _
Offset(1, -1).Resize(200, 1).ClearContents
End With


--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Robert Christie" skrev i en
meddelelse ...
Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize down 200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 218
Default Addressing cells without selecting

Try the following. Correct for wordwrap.

With ActiveSheet
..Range("B" & .Rows.Count).End(xlUp).Offset(1, -1).Resize
(200, 1).ClearContents
End With

Regards,
Greg

-----Original Message-----
Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize down 200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Addressing cells without selecting

No Frank
That will clear all my data in columns A and B from below
title row.
Note!! "Select" is in code just for testing

Thanks

Regards Bob C.

-----Original Message-----
Hi
is this what you're looking for??
With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset

(1, -
1).Resize(200, 1)).Clearcontents
End With


--
Regards
Frank Kabel
Frankfurt, Germany

Robert Christie wrote:
Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize down

200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset

(1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Addressing cells without selecting

Hi
not quite sure but maybe you're looking for this?
With ActiveSheet
Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1).Clearcontents
End With



--
Regards
Frank Kabel
Frankfurt, Germany

Robert Christie wrote:
No Frank
That will clear all my data in columns A and B from below
title row.
Note!! "Select" is in code just for testing

Thanks

Regards Bob C.

-----Original Message-----
Hi
is this what you're looking for??
With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset (1, -
1).Resize(200, 1)).Clearcontents
End With


--
Regards
Frank Kabel
Frankfurt, Germany

Robert Christie wrote:
Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize down 200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset (1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.

.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Addressing cells without selecting

A big thankyou to Frank, Leo & Greg.
I'll get on top of this VBA sometime, if I live long
enough.

Thanks again

Regards Bob C.

-----Original Message-----
Hi
not quite sure but maybe you're looking for this?
With ActiveSheet
Cells(.Rows.Count, "B").End(xlUp).Offset(1, -
1).Resize(200, 1).Clearcontents
End With



--
Regards
Frank Kabel
Frankfurt, Germany

Robert Christie wrote:
No Frank
That will clear all my data in columns A and B from

below
title row.
Note!! "Select" is in code just for testing

Thanks

Regards Bob C.

-----Original Message-----
Hi
is this what you're looking for??
With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End(xlUp).Offset

(1, -
1).Resize(200, 1)).Clearcontents
End With


--
Regards
Frank Kabel
Frankfurt, Germany

Robert Christie wrote:
Hi everyone
I'm trying to find the last cell of data in Column B,
offset 1 row down and 1 column left, then resize

down 200
rows in column A and clearcontents.
My attempt so far, selects all cells from A2 down 200
rows past the last cell in Column B.
I'm trying to achieve this without selecting ranges.
Code so far;

With ActiveSheet
Range("B2", .Cells(.Rows.Count, "B").End

(xlUp).Offset (1, -
1).Resize(200, 1)).Select
End With

Note!! "Select" is in code just for testing.

TIA

Regards Bob C.
.

.

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
Selecting multiple cells, I can't see the cells highlighted ET Excel Discussion (Misc queries) 1 August 1st 08 03:20 PM
How to change shade of cells when selecting multiple cells abrummet Excel Discussion (Misc queries) 3 September 6th 07 11:42 AM
By selecting cells adjacent to cells tally sheet tom Excel Worksheet Functions 2 September 20th 06 07:09 PM
absolute addressing and inserting new cells flyswiftly Excel Discussion (Misc queries) 3 September 19th 06 12:22 AM
Addressing cells on inactive sheets John Duffus Excel Discussion (Misc queries) 4 October 22nd 05 06:13 PM


All times are GMT +1. The time now is 11:08 PM.

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"