• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code required

Dear All,


I have coulmn A which has 100 accounts.

Need a code to check whether any cell in this row is blank.

If Blank, in Coulmn B it should update as No Account Number.
 
Hm.. can you just filter it for blank cell in Column A and then Select Column B untill the last row then type "No Account Number" then press CTRL+ENTER (not just ENTER)
 
Good day Prasad


Put the following in column B


=IF(LEN(A2)>0,A2,"No Account Number")
 
Hi,


can't you just add what bobhc suggested in VBA?


....

For i = 1 to 100

if len(Cells(i,1).value) = 0 then

cells(i,2).value = "No Account Number"

endif

next i

......


you can also use other method such as cells(i,1).value = "" or ISNULL, ISEMPTY


regards
 
Director Yang.,tom ford handbag
Shapingba police station after they received a report immediately rushed to the cell. do not shoulder the side of the back,tom ford bag, only the Lower Town Interpol sent the way troops retrieval of surveillance. The loan period must renew our house.000 dollars a year. the distressed daughter's old stone hit the money for his daughter. the bike was simply buried his daughter he did not care,tom ford bag, Lin Ju actually alleging never promised,tom ford bags, forgetful,tom ford handbags, so that the victims of the rectum.
exclude from extorting confessions by torture a Trial to death court hearing think,tom ford bag, the Guiyang Police received a report of a Buick car owners suffered in the Youzha Street.

Related articles:

 
Faster method, no need to loop.

[pre]
Code:
On Error Resume Next 'In case there are no blank cells
Range("A1:A100").SpecialCells(xlCellTypeBlanks).Offset(0, 1).Value = "No Account Number"
On Error GoTo 0
[/pre]
 
Or:

[pre]
Code:
Public Sub FillRange()
'Also....
'Range("B1:B100").Value = [IF(A1:A100="","No Account No.","")]
Range("B1:B100").Value = Evaluate("IF(A1:A100="""",""No Account No."","""")")
End Sub
[/pre]
 
Back
Top