Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Macro-Return Blank Cell

I am creating an Invoice by the help of macro where I want to clear all the
data from unlock cell after entering the buttom named NEXT or OK.So I could
enter fresh data in the same unlock cell.

How it possible?

Rdgs...Sudipta
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Macro-Return Blank Cell

Sub setup()
Dim cel As Range, r As Range
For Each r In ActiveSheet.UsedRange
If r.Locked Then
Else
If cel Is Nothing Then
Set cel = r
Else
Set cel = Union(cel, r)
End If
End If
Next

If cel Is Nothing Then
Else
cel.Clear
End If

End Sub

--
Gary''s Student - gsnu200909
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Macro-Return Blank Cell

Thank Gary for ur co-operation. But actually I want clear content without
disburbing my formula & format from individual cell. means from a2 , c2, a7,
d8 etc.

want to use
clear contents macro for mentioned cell.

With Loves
Sudipta

"Gary''s Student" wrote:

Sub setup()
Dim cel As Range, r As Range
For Each r In ActiveSheet.UsedRange
If r.Locked Then
Else
If cel Is Nothing Then
Set cel = r
Else
Set cel = Union(cel, r)
End If
End If
Next

If cel Is Nothing Then
Else
cel.Clear
End If

End Sub

--
Gary''s Student - gsnu200909

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
Return blank cell if data cell is blank imckinne Excel Worksheet Functions 4 September 15th 09 04:28 PM
Return value of non-blank cell Teri Excel Discussion (Misc queries) 2 March 4th 09 07:58 PM
How to return a blank formula cell if the reference is blank? waybomb Excel Worksheet Functions 2 January 22nd 09 05:53 PM
If cell blank return a blank Angela1979 Excel Worksheet Functions 8 March 7th 07 01:18 PM
return zero from a blank cell Eric Excel Worksheet Functions 5 July 15th 05 11:23 PM


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