Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter NA() into All Blank Cells in Range
I have dates in Column A, and data in Column B:E.
I am using this little snippet of code to insert NA into cells to force my graph to plot correctly: Sheets("GRAPH CURRENT").Select MyVar = "" For Each Item In Range("B3:E3") If Item.Value = MyVar Then Item.Value = "=NA()" Next Item The graph is based on this tip: http://j-walk.com/ss/excel/usertips/tip024.htm So, Im plugging NA into cells that would otherwise be zero. I used this code to fill down with NA in each column: Range("B3").Select Selection.AutoFill Destination:=Range _ (Selection, Selection.Offset(0, 1).End(xlDown).Offset(0, -1)) However, there are some cells towards the bottom of the list in B:E, before the dates in Column A end. So, I get some zeros under the actual data! Im trying to come up with a way of getting to the end of the used range in Column A, offset 1 column, and select all cells from this current cell up to B3, and fill all blanks with "=NA()". For instance, select B600:B3, and enter =NA() into all blanks, knowing that the B600 changes constantly. Then, move to Column C, D, and E. Does anyone have a good idea as to how to do this? Regards, Ryan-- -- RyGuy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enter various number of blank lines in cells | New Users to Excel | |||
Maximum Number of Blank Cells between Non Blank Cells in a Range | Excel Worksheet Functions | |||
Determine if range has NO Blank Cells without looping through each cell in range | Excel Programming | |||
User must enter something in a range of cells | Excel Discussion (Misc queries) | |||
enter numbers in blank cells | Excel Worksheet Functions |