# Fill blank cells with specific text in MS Excel



## deja2000 (Oct 28, 2008)

I am creating an Excel template for a report I run monthly. I would like to write code that will automatically fill all blanks with a specific value. In researching the code I have run into two problems:

1. The report will always have the same number of columns but will have a different number of rows each month based on how many shipments were made. I could not find code that allows for this so that I don't leave any rows out but also don't fill every cell in the worksheet.

2. I cannot find code that will input the text, “null" into blank cells. Everything I can find to reference puts the value of the cell above into the blank cell.

Please help


----------



## Anne Troy (May 1, 2006)

Try this manually. If it works, try recording it as a macro.

>Select all cells
>F5 key, choose "Blanks"
>Type the value
>Hit Ctrl+Enter


----------



## deja2000 (Oct 28, 2008)

It worked, thanks!


----------

