Solved

Add data at empty cell

Posted on 2011-03-15
8
315 Views
Last Modified: 2012-08-13
Hi Experts,

I would like to request Experts help create a macro to add empty cell (active rows) at column A to AX with “No Data” automatically. Hope Experts will help me to create this feature.



AddData.xls
0
Comment
Question by:Cartillo
  • 3
  • 3
  • 2
8 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35135600
At Which row?

Sid
0
 

Author Comment

by:Cartillo
ID: 35135627
Hi Sid,

The empty cell can be found in any active rows from column A:AX
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35135629
Rather than create a macro, use this technique for placing a value in all empty cells in a selection.

Select the block of cells into which the value or formula is to be copied. Include any non-empty cells. Choose the menu command Edit->Go To, click Special, select Blanks, and click OK. Enter the formula into the formula entry box in the Formula Bar and press CTRL+ENTER.

If the formula is complex or already exists then copy it to the clipboard before selecting the cells. To copy a formula in a cell to the clipboard, select the cell, select the formula from the formula entry box in the Formula Bar, press CTRL+C, and press ENTER. It is important to press ENTER before selecting any cells as the selection process will change any formula currently being edited.

Note that any selected cells that are not part of the used range will not be included.

Kevin
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35135638
If you want a macro to do same:

Sub DoIt()
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.FormulaR1C1 = "No Data"
End Sub

Kevin
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35135648
Cartillo: Your thread says "Add data at empty cell" and the post says, "to add empty cell (active rows) at column A to AX with “No Data” automatically"

Which one do u want?

Sid
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 35135652
Even better:

Sub DoIt()
    Selection.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "No Data"
End Sub

Or, if you want to do the entire used range:

Sub DoIt()
    ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "No Data"
End Sub

Kevin
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35135656
After reading Kevin's post, I think I understood what you want :)

Sid
0
 

Author Closing Comment

by:Cartillo
ID: 35142327
Hi Kevin/Sid

Thanks a lot for the help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now