Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding next blank cell

Hi,

Hopefully you can suggest how I can adabt my VBA Excel Sheet,

I have created a userform to input my work on and after i have entere
the details on the form i need it to enter it into my excel spreedshee
at the next available blank cell, problem is as i have formulas in th
right hand side of the row it picks them up and counts the cell as no
being blank and trys to find the next one i just want it to ignore th
right hand row.

Here's what I'm using:

Worksheets("Sheet1").Activate
Range("A5").Select
If Range("A5").Value = " " Then
Range("A5").Activate
Else
Range("A5").CurrentRegion.Select
ActiveCell.Offset(Selection.Rows.Count, 0).Activate
End If

Any suggestion would be great as pulling my hair out

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Finding next blank cell

IF you want the next blank cell in column A, try

Worksheets("Sheet1").Activate
If Range("A5").Value = " " Then
Range("A5").Activate
Else
Cells(Rows.Count,"A").End(xlUp).Offset(1,0).Select
End If


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"JaiD " wrote in message
...
Hi,

Hopefully you can suggest how I can adabt my VBA Excel Sheet,

I have created a userform to input my work on and after i have entered
the details on the form i need it to enter it into my excel spreedsheet
at the next available blank cell, problem is as i have formulas in the
right hand side of the row it picks them up and counts the cell as not
being blank and trys to find the next one i just want it to ignore the
right hand row.

Here's what I'm using:

Worksheets("Sheet1").Activate
Range("A5").Select
If Range("A5").Value = " " Then
Range("A5").Activate
Else
Range("A5").CurrentRegion.Select
ActiveCell.Offset(Selection.Rows.Count, 0).Activate
End If

Any suggestion would be great as pulling my hair out.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Finding next blank cell

Something like this might be do what you want:

Worksheets("Sheet1").Activate

If Cells(5, 1).Value = " " Then
Cells(5, 1).Select
Else
Cells(5, 1).End(xlDown).Offset(1, 0).Select
End If


RBS


"JaiD " wrote in message
...
Hi,

Hopefully you can suggest how I can adabt my VBA Excel Sheet,

I have created a userform to input my work on and after i have entered
the details on the form i need it to enter it into my excel spreedsheet
at the next available blank cell, problem is as i have formulas in the
right hand side of the row it picks them up and counts the cell as not
being blank and trys to find the next one i just want it to ignore the
right hand row.

Here's what I'm using:

Worksheets("Sheet1").Activate
Range("A5").Select
If Range("A5").Value = " " Then
Range("A5").Activate
Else
Range("A5").CurrentRegion.Select
ActiveCell.Offset(Selection.Rows.Count, 0).Activate
End If

Any suggestion would be great as pulling my hair out.


---
Message posted from http://www.ExcelForum.com/


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
Finding Next Blank Cell in Blank Row Nick Wakeham Excel Worksheet Functions 3 June 11th 08 02:15 PM
Finding next non-blank cell Stu[_2_] Excel Discussion (Misc queries) 4 October 23rd 07 01:29 PM
Finding the Blank Cell Cory Thomas[_2_] Excel Programming 0 June 2nd 04 05:54 PM
Finding next Blank Cell in Column trickdos[_3_] Excel Programming 2 May 19th 04 04:33 PM
Finding first non-blank cell Allison[_2_] Excel Programming 7 October 18th 03 01:47 AM


All times are GMT +1. The time now is 06:28 PM.

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"