Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Tom Olgilvy Question

Tom,
You recently suggested how to find the next blank cell in a row in the
following note:

if you have columns A5:C5 with values, Cells D5 blank, Cells E5:H5 with
values
then D5 would be an embedded blank cell and doing
Cells(5,1).end(xltoright)(1,2) would find D5.

Cells(5,256).End(xltoLeft)(1,2) would find I5.

--
Regards,
Tom Ogilvy

I have the following code to resize a range after I added some data to it.
It works fine, except that some of my new data was blanks. Consequently my
range was too short. I would lke to implement the technique you suggested,
however, I can't seem to get it to work. Would you fix it for me?

With Range("MyRange").Resize(1,1)
.Parent.Range(.Item(1), .End(xlToRight)).Name = "MyRange"
End With

Thanks in advance for your help!

Ray


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tom Olgilvy Question

With Range("MyRange").Resize(1,1)
.Parent.Range(.Item(1), _
.parent.Cells(.Row,256).End(xlToLeft)).Name = "MyRange"
End With

--
Regards,
Tom Ogilvy


Ray Batig wrote in message
hlink.net...
Tom,
You recently suggested how to find the next blank cell in a row in the
following note:

if you have columns A5:C5 with values, Cells D5 blank, Cells E5:H5 with
values
then D5 would be an embedded blank cell and doing
Cells(5,1).end(xltoright)(1,2) would find D5.

Cells(5,256).End(xltoLeft)(1,2) would find I5.

--
Regards,
Tom Ogilvy

I have the following code to resize a range after I added some data to it.
It works fine, except that some of my new data was blanks. Consequently my
range was too short. I would lke to implement the technique you

suggested,
however, I can't seem to get it to work. Would you fix it for me?

With Range("MyRange").Resize(1,1)
.Parent.Range(.Item(1), .End(xlToRight)).Name = "MyRange"
End With

Thanks in advance for your help!

Ray




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Tom Olgilvy Question

Tom,

Thank you very much. It makes sense now.

Regards,
Ray

Tom Ogilvy wrote in message
...
With Range("MyRange").Resize(1,1)
.Parent.Range(.Item(1), _
.parent.Cells(.Row,256).End(xlToLeft)).Name = "MyRange"
End With

--
Regards,
Tom Ogilvy


Ray Batig wrote in message
hlink.net...
Tom,
You recently suggested how to find the next blank cell in a row in the
following note:

if you have columns A5:C5 with values, Cells D5 blank, Cells E5:H5

with
values
then D5 would be an embedded blank cell and doing
Cells(5,1).end(xltoright)(1,2) would find D5.

Cells(5,256).End(xltoLeft)(1,2) would find I5.

--
Regards,
Tom Ogilvy

I have the following code to resize a range after I added some data to

it.
It works fine, except that some of my new data was blanks. Consequently

my
range was too short. I would lke to implement the technique you

suggested,
however, I can't seem to get it to work. Would you fix it for me?

With Range("MyRange").Resize(1,1)
.Parent.Range(.Item(1), .End(xlToRight)).Name = "MyRange"
End With

Thanks in advance for your help!

Ray






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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
big question to me Wu Excel Discussion (Misc queries) 1 August 11th 09 04:06 PM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


All times are GMT +1. The time now is 06:31 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"