Hi Prashant 

I Hope This will help you.

Public Sub Test()
    
    Dim wks As Worksheet
    Dim intCol  As Integer
    Dim intRow  As Integer
    Dim intR    As Integer
    
    intR = 1
    For Each wks In ThisWorkbook.Worksheets
        If wks.Name <> "output" Then
            For intCol = 1 To wks.UsedRange.Columns.Count
                For intRow = 1 To wks.UsedRange.Rows.Count
                    If IsNumeric(wks.Cells(intRow, intCol).Value) And 
Left(wks.Cells(intRow, intCol).Text, 1) = "#" Then
                        ThisWorkbook.Worksheets("output").Range("A" & 
intR).Value = wks.Name
                        ThisWorkbook.Worksheets("output").Range("B" & 
intR).Value = wks.UsedRange.Cells(intRow, intCol).Address
                        intR = intR + 1
                    End If
                Next
            Next
        End If
    Next
End Sub


Regards
Prince dubey.


On Sunday, November 11, 2012 2:27:07 PM UTC+5:30, ppawle.excel wrote:
>
> Dear Ashish,
>
> Thanks for the below code.
>
> But I need to get output as shown in the attached sheet & code should list 
> all narrow cells in that workbook.
>
> Regards
>
> Prashant
>
> On Sun, Nov 11, 2012 at 12:40 PM, ashish koul <koul....@gmail.com<javascript:>
> > wrote:
>
>>
>> Sub sample1()
>> Dim wk As Worksheet
>> Dim cl As Range
>> Set wk = ActiveSheet
>> For Each cl In wk.UsedRange.Columns
>>     If IsNumeric(cl.Cells(2, 1).Value) And Left(cl.Cells(2, 1).Text, 1) = 
>> "#" Then
>>             MsgBox cl.Address(0, 0)
>>     End If
>> Next
>> End Sub
>>
>>
>>
>> On Sun, Nov 11, 2012 at 1:23 PM, Prashant Pawle 
>> <ppawle...@gmail.com<javascript:>
>> > wrote:
>>
>>> Dear Team,
>>>
>>> Need a code for listing cell references from all sheets which have too 
>>> narrow column width(#####).
>>>
>>> Sample file attached
>>>
>>> Regards,
>>>
>>> Prashant
>>>
>>>  -- 
>>> Join official facebook page of this forum @ 
>>> https://www.facebook.com/discussexcel
>>>  
>>> FORUM RULES (1120+ members already BANNED for violation)
>>>  
>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>>> will not get quick attention or may not be answered.
>>>  
>>> 2) Don't post a question in the thread of another member.
>>>  
>>> 3) Don't post questions regarding breaking or bypassing any security 
>>> measure.
>>>  
>>> 4) Acknowledge the responses you receive, good or bad.
>>>  
>>> 5) Cross-promotion of, or links to, forums competitive to this forum in 
>>> signatures are prohibited. 
>>>  
>>> 6) Jobs posting is not allowed.
>>>  
>>> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>>>  
>>> NOTE : Don't ever post personal or confidential data in a workbook. 
>>> Forum owners and members are not responsible for any loss.
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "MS EXCEL AND VBA MACROS" group.
>>> To post to this group, send email to excel-...@googlegroups.com<javascript:>
>>> .
>>> To unsubscribe from this group, send email to 
>>> excel-macros...@googlegroups.com <javascript:>.
>>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>>>  
>>>  
>>>
>>
>>
>>
>> -- 
>> *Regards*
>> * *
>> *Ashish Koul*
>>
>>
>> *Visit*
>> *http://www.excelvbamacros.com/*
>> *http://www.accessvbamacros.com/*
>>
>> P Before printing, think about the environment.
>>  
>>  
>>
>>  -- 
>> Join official facebook page of this forum @ 
>> https://www.facebook.com/discussexcel
>>  
>> FORUM RULES (1120+ members already BANNED for violation)
>>  
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>> will not get quick attention or may not be answered.
>>  
>> 2) Don't post a question in the thread of another member.
>>  
>> 3) Don't post questions regarding breaking or bypassing any security 
>> measure.
>>  
>> 4) Acknowledge the responses you receive, good or bad.
>>  
>> 5) Cross-promotion of, or links to, forums competitive to this forum in 
>> signatures are prohibited. 
>>  
>> 6) Jobs posting is not allowed.
>>  
>> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>>  
>> NOTE : Don't ever post personal or confidential data in a workbook. Forum 
>> owners and members are not responsible for any loss.
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "MS EXCEL AND VBA MACROS" group.
>> To post to this group, send email to excel-...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> excel-macros...@googlegroups.com <javascript:>.
>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>>  
>>  
>>
>
>

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to