Need formula

CRAIG20

Board Regular
Joined
Mar 20, 2006
Messages
228
Hi I need a conditional format formula.

It simply is this.

If a cell is blank I want it to enter an asterisk '*' in the cell.

Thanks

Craig
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You can't do that with a conditional format.

Is the blank cell the result of a formula?
 
Upvote 0
That isn't possible with a formula or conditional formatting. Perhaps a macro: select the range and run

Code:
Sub BlAsk()
Selection.SpecialCells(xlCellTypeBlanks).Value = "*"
End Sub
 
Upvote 0
No. Its just a table full of figures but some cells are blank. However I need to import the table into another program, but it won't accept blank cells. I just need to enter anything at all really into the blank cells, so they are not blank anymore.
 
Upvote 0
I don't think the conditional formatting can do that. It can change the interior color or fill of the cell and the font etc. but it can't change the value of the cell. And it looks like that's what you're looking for.

You can use a normal IF-formula to return the asterix to the formula cell if the reference cell is empty (ie. something like =IF(A1="","*",A1)). Or you can use a simple macro to fill the empty cells in the given range with asterixes if you want to:

Paste the following in the worksheet module in your VB Editor:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim c As Range

    For Each c In Range("A1:H10")   'The range you want to fill with asterixes
        With c
            If IsEmpty(.Value) Then .Value = "*"
        End With
    Next c

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top