Hi there.
I am trying to write in VB some code that will enter a number in a column if a cell has some data in it and one character is an @.
Please see attached spreasheet for idea.
Thanks
Mark
Hi there.
I am trying to write in VB some code that will enter a number in a column if a cell has some data in it and one character is an @.
Please see attached spreasheet for idea.
Thanks
Mark
You could just use a formula in column AD:
=IF(ISNUMBER(FIND("@",O2)),1,0)
If you actually need VB, then try:
![]()
Sub GetAt() Dim n As Long, lngRow As Long lngRow = Cells(Rows.Count, "O").End(xlUp).Row For n = 2 To lngRow Cells(n, "AD").Value = Abs(InStr(Cells(n, "O").Value, "@") > 0) Next n End Sub
Last edited by romperstomper; 09-30-2009 at 08:47 AM. Reason: Added code version.
Everyone who confuses correlation and causation ends up dead.
Thanks for that.
All sorted!
Mark
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks