Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default newbie - If a cell is blank

Hello,
I am a newbie. Anyway, here we go...

The project I am working is to make my life easier at work. So you may get
a lot of questions on here from over the next few months!!!!

Anyway, I have a command button that is to be linked to another sheet, if
pressed it goes there .. that was easy! .. but now i need it to check that
a cell is not empty B4 it goes onto the other sheet, if it is empty it will
not goto the other sheet ... if you know what I mean.

Sheets1 has the button and a cell that needs to be filled. if filled then
it goes to Sheet2, if not then it stays on sheet1.


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080107-0, 07/01/2008
Tested on: 07/01/2008 21:32:33
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default newbie - If a cell is blank

On 7 Jan., 22:32, Steve wrote:
Hello,
I am a newbie. Anyway, here we go...

The project I am working is to make my life easier at work. So you may get
a lot of questions on here from over the next few months!!!!

Anyway, I have a command button that is to be linked to another sheet, if
pressed it goes there .. that was easy! .. but now i need it to check that
a cell is not empty B4 it goes onto the other sheet, if it is empty it will
not goto the other sheet ... if you know what I mean.

Sheets1 has the button and a cell that needs to be filled. if filled then
it goes to Sheet2, if not then it stays on sheet1.

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080107-0, 07/01/2008
Tested on: 07/01/2008 21:32:33
avast! - copyright (c) 1988-2008 ALWIL Software.http://www.avast.com


Hi Steve

Something like this:

if sheets("Sheet1").range("B4").value < "" then
sheets("Sheet2").select

Regards,

Per
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default newbie - If a cell is blank

Not tested but this should do what you want, just fill in row and column for
the row and column you are checking. btw in code you don't need to navigate
to the page to see if it is blank, just include the sheet name or number.
If Sheets(2).cells(row,col)="" then
exit sub
End if

'code for what to do if it is not blank

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Steve" wrote:

Hello,
I am a newbie. Anyway, here we go...

The project I am working is to make my life easier at work. So you may get
a lot of questions on here from over the next few months!!!!

Anyway, I have a command button that is to be linked to another sheet, if
pressed it goes there .. that was easy! .. but now i need it to check that
a cell is not empty B4 it goes onto the other sheet, if it is empty it will
not goto the other sheet ... if you know what I mean.

Sheets1 has the button and a cell that needs to be filled. if filled then
it goes to Sheet2, if not then it stays on sheet1.


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080107-0, 07/01/2008
Tested on: 07/01/2008 21:32:33
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.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
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... [email protected][_2_] Excel Programming 2 June 7th 07 09:27 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Excel Programming 4 April 12th 07 08:56 PM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


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