check sheet if Col N has empty cells then add text

Sdwd76

New Member
Joined
May 17, 2021
Messages
26
Office Version
  1. 365
Platform
  1. Windows
Add Text to empty cells in a col

"Refer to Manual"

If anyone can help.

Sheet is called "Results"
Col N is called "Comments"

if empty cells upto the last filled row then add text "refer to manual"

thanks

would like VB code
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Is there any particular column that can be used to determine the last filled row?
 
Upvote 0
See if this does what you want:
VBA Code:
Sub MyCheckForBlanks()

    Dim lr As Long
  
'   Find last row with data in column N
    lr = Cells(Rows.Count, "N").End(xlUp).Row
  
'   Populate blank cells in range
    Range("N1:N" & lr).SpecialCells(xlCellTypeBlanks) = "Refer to Manual"
  
End Sub
 
Upvote 0
Solution
You are welcome.
Glad we were able to help!
 
Upvote 0
Is there any particular column that can be used to determine the last filled row?
AE - the above sort of works however does not work if the rows are empty? or only a few rows filled.
 
Upvote 0
AE - the above sort of works however does not work if the rows are empty? or only a few rows filled.
Maybe this?
VBA Code:
Sub MyCheckForBlanks()

    Dim lr As Long
  
'   Find last row with data in column AE
    lr = Cells(Rows.Count, "AE").End(xlUp).Row
  
'   Populate blank cells in column N
    Range("N1:N" & lr).SpecialCells(xlCellTypeBlanks) = "Refer to Manual"
  
End Sub
If that does not work, please post a sample of your data where it does not work properly, so we can see what it looks like.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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