check this
Sub checkforformula() Dim i As Long Dim cell As Range For Each cell In Cells.SpecialCells(xlCellTypeFormulas) MsgBox cell.Address Next cell End Sub Sub ab() Dim i As Long Dim cell As Range 'ActiveSheet.UsedRange.Select Cells.Select For Each cell In Selection If Len(cell.Text) = 7 Then If IsNumeric(Right(cell.Value, 5)) And Application.WorksheetFunction.IsText(Left(cell.Value, 2)) Then MsgBox cell.Address End If End If Next cell End Sub On Sat, Apr 24, 2010 at 10:43 PM, Harpreet Singh Gujral < harpreetguj...@gmail.com> wrote: > > > Hi Group, > > I have a weird query today, i hope i am able to present the case and a > solution is possible for it. > > I need to achieve the following: > > 1) A macro that will search the whole sheet for those cells which consists > of formulas > > 2) And if a cell is found meeting criteria one, It needs to be able to find > out the cell address, that is referred to in the formula > > Is it possible, or i am just day dreaming!!!! > > Another question, can search all the cells on the worksheet, with a > crietria. Example: Cells which have input as "XXYYYYY" are only identified > in a loop.Where XX are alphabets and YYYYY is numeric. > > Any suggestions > > Harry > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,800 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe