LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Find first unused cell in row

Another way to convert those "text" numbers to "number" numbers is to copy an
empty cell and then paste special|add to the range.

It's less to do (no cleaning up later):

Dim myCell as range
dim myRng as range
with activesheet
set mycell = .cells.specialcells(xlcelltypelastcell).offset(1,1 )
set myrng = .range("somerangetofix")
end with
mycell.copy
myRng.PasteSpecial operation:=xlPasteSpecialOperationAdd

And it won't turn empty cells into 0's.

Judy Ward wrote:

I have code that inserts a "1" in the first unused cell in row A (then I
multiply some columns by the 1 to convert them from being stored as text to
number and delete the 1).

Currently I have the location of the first unused cell hard-coded ("AF1")
and have to remember to change this value whenever the columns of data grow.

I would like to be able to find the location of the first unused cell
through code. Can anyone help with this?

Thank you,
Judy


--

Dave Peterson
 
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
Find column letter of the first unused cell John Excel Worksheet Functions 2 May 10th 09 09:06 PM
what to do with unused cells B Excel Worksheet Functions 1 June 22nd 06 12:09 AM
Get Last Unused Cell Session101 Excel Programming 3 September 7th 04 10:53 PM
Code not going to next unused row goss[_30_] Excel Programming 2 August 9th 04 05:04 AM
find next unused row Mike[_33_] Excel Programming 2 July 16th 03 05:01 AM


All times are GMT +1. The time now is 06:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"