Re: $$Excel-Macros$$ Loop through

2014-04-27 Thread Pramod Singh
My Pleasure.


On Mon, Apr 28, 2014 at 11:25 AM, Rupesh Patil
wrote:

> Dear Pramod,
>
> Thanks you very very much.
>
>
> On Mon, Apr 28, 2014 at 11:19 AM, Pramod Singh wrote:
>
>> Hi Rupesh,
>>
>> Please find the attached file. as per ur requirement.
>>
>> Regards/Pramod
>>
>>
>>
>> On Mon, Apr 28, 2014 at 10:03 AM, Rupesh Patil <
>> patil.rupesh1...@gmail.com> wrote:
>>
>>> Hello Expert,
>>> Good Morning
>>>
>>> I need your help,
>>> I am not able to determine how to loop through only till last used row
>>> and column, sample file is attachment, Please go through it and help me
>>> out.
>>>
>>>
>>>
>>> --
>>> Thanks and Regards, Rp.
>>>
>>> --
>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>>> https://www.facebook.com/discussexcel
>>>
>>> FORUM RULES
>>>
>>> 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) Jobs posting is not allowed.
>>> 6) Sharing copyrighted material and their links is not allowed.
>>>
>>> NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to excel-macros+unsubscr...@googlegroups.com.
>>> To post to this group, send email to excel-macros@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/excel-macros.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> *PramodSingh*
>>
>> --
>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
>> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 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) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to excel-macros+unsubscr...@googlegroups.com.
>> To post to this group, send email to excel-macros@googlegroups.com.
>> Visit this group at http://groups.google.com/group/excel-macros.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Thanks and Regards, Rp.
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 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) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*PramodSingh*

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Ad

Re: $$Excel-Macros$$ Loop through

2014-04-27 Thread Rupesh Patil
Dear Pramod,

Thanks you very very much.


On Mon, Apr 28, 2014 at 11:19 AM, Pramod Singh  wrote:

> Hi Rupesh,
>
> Please find the attached file. as per ur requirement.
>
> Regards/Pramod
>
>
>
> On Mon, Apr 28, 2014 at 10:03 AM, Rupesh Patil  > wrote:
>
>> Hello Expert,
>> Good Morning
>>
>> I need your help,
>> I am not able to determine how to loop through only till last used row
>> and column, sample file is attachment, Please go through it and help me
>> out.
>>
>>
>>
>> --
>> Thanks and Regards, Rp.
>>
>> --
>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
>> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 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) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to excel-macros+unsubscr...@googlegroups.com.
>> To post to this group, send email to excel-macros@googlegroups.com.
>> Visit this group at http://groups.google.com/group/excel-macros.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> *PramodSingh*
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 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) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks and Regards, Rp.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

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) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


Re: $$Excel-Macros$$ Loop through

2014-04-27 Thread Pramod Singh
Hi Rupesh,

Please find the attached file. as per ur requirement.

Regards/Pramod



On Mon, Apr 28, 2014 at 10:03 AM, Rupesh Patil
wrote:

> Hello Expert,
> Good Morning
>
> I need your help,
> I am not able to determine how to loop through only till last used row and
> column, sample file is attachment, Please go through it and help me out.
>
>
>
> --
> Thanks and Regards, Rp.
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 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) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*PramodSingh*

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

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) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


loop_sample.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


$$Excel-Macros$$ Loop through

2014-04-27 Thread Rupesh Patil
Hello Expert,
Good Morning

I need your help,
I am not able to determine how to loop through only till last used row and
column, sample file is attachment, Please go through it and help me out.



-- 
Thanks and Regards, Rp.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

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) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


loop_sample.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


Re: $$Excel-Macros$$ loop through cell

2012-03-07 Thread dguillett1

Send direct to dguillett1 @gmail.com



Don Guillett
Microsoft MVP Excel
SalesAid Software
dguille...@gmail.com
-Original Message- 
From: LearnExcel

Sent: Wednesday, March 07, 2012 4:33 PM
To: MS EXCEL AND VBA MACROS
Subject: Re: $$Excel-Macros$$ loop through cell

Don work Great thanks

For Each ws In ThisWorkbook.Worksheets
   If InStr(1, ws.Name, vbTextCompare) = 0 _
what ??
   And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
i use this code to not look at the "doc" sheet, is there a better
way?

i have 10 sheets that i want the the code to run on and the ones that
i dont i use the top code.


and how do you send sheets through groups? i dont know how to include
attachment .



On Mar 7, 10:15 am, vijayajith VA  wrote:

Hi learn excel..

Please send it with attachment.. it will be helpful.Thanks///







On Wed, Mar 7, 2012 at 8:16 AM, LearnExcel  wrote:
> help with code

> Dim ws As Worksheet

> can someone tell me why the follwowing code wont work

>For Each ws In ThisWorkbook.Worksheets
>If InStr(1, ws.Name, vbTextCompare) = 0 _
>   And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
> Columns("C:C").EntireColumn.AutoFit
>   ws.Columns("E:H").Select
>ws.Selection.ColumnWidth = 13.86
>   ws.Columns("L:L").ColumnWidth = 40
>  ws.Columns("K:K").ColumnWidth = 4

>End If

>Next ws

> End Sub

> --
> FORUM RULES (986+ 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.

> NOTE  : Don't ever post personal or confidential data in a workbook. 
> Forum

> owners and members are not responsible for any loss.

> --- 
>  ---

> To post to this group, send email to excel-macros@googlegroups.com


--
FORUM RULES (986+ 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.


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com 


--
FORUM RULES (986+ 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. 


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ loop through cell

2012-03-07 Thread LearnExcel
Don work Great thanks

For Each ws In ThisWorkbook.Worksheets
If InStr(1, ws.Name, vbTextCompare) = 0 _
what ??
And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
i use this code to not look at the "doc" sheet, is there a better
way?

i have 10 sheets that i want the the code to run on and the ones that
i dont i use the top code.


and how do you send sheets through groups? i dont know how to include
attachment .



On Mar 7, 10:15 am, vijayajith VA  wrote:
> Hi learn excel..
>
> Please send it with attachment.. it will be helpful.Thanks///
>
>
>
>
>
>
>
> On Wed, Mar 7, 2012 at 8:16 AM, LearnExcel  wrote:
> > help with code
>
> > Dim ws As Worksheet
>
> > can someone tell me why the follwowing code wont work
>
> >    For Each ws In ThisWorkbook.Worksheets
> >        If InStr(1, ws.Name, vbTextCompare) = 0 _
> >           And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
> >             Columns("C:C").EntireColumn.AutoFit
> >   ws.Columns("E:H").Select
> >    ws.Selection.ColumnWidth = 13.86
> >   ws.Columns("L:L").ColumnWidth = 40
> >  ws.Columns("K:K").ColumnWidth = 4
>
> >        End If
>
> >    Next ws
>
> > End Sub
>
> > --
> > FORUM RULES (986+ 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.
>
> > NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> > owners and members are not responsible for any loss.
>
> > --- 
> > ---
> > To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ 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. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ loop through cell

2012-03-07 Thread vijayajith VA
Hi learn excel..

Please send it with attachment.. it will be helpful.Thanks///

On Wed, Mar 7, 2012 at 8:16 AM, LearnExcel  wrote:

> help with code
>
>
> Dim ws As Worksheet
>
> can someone tell me why the follwowing code wont work
>
>
>
>For Each ws In ThisWorkbook.Worksheets
>If InStr(1, ws.Name, vbTextCompare) = 0 _
>   And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
> Columns("C:C").EntireColumn.AutoFit
>   ws.Columns("E:H").Select
>ws.Selection.ColumnWidth = 13.86
>   ws.Columns("L:L").ColumnWidth = 40
>  ws.Columns("K:K").ColumnWidth = 4
>
>End If
>
>Next ws
>
>
>
>
> End Sub
>
> --
> FORUM RULES (986+ 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.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (986+ 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. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ loop through cell

2012-03-07 Thread dguillett1

Many reasons. What are you trying to do?

For Each ws In ThisWorkbook.Worksheets
   If InStr(1, ws.Name, vbTextCompare) = 0 _
what ??


   And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then

'you didn’t select the worksheet and you do NOT need to
with ws
 .Columns("C").AutoFit
 .Columns("E:H").ColumnWidth = 13.86
 .Columns("L").ColumnWidth = 40
 .Columns("K:").ColumnWidth = 4
end with
End If
Next ws



Don Guillett
Microsoft MVP Excel
SalesAid Software
dguille...@gmail.com
-Original Message- 
From: LearnExcel

Sent: Tuesday, March 06, 2012 8:46 PM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ loop through cell

help with code


Dim ws As Worksheet

can someone tell me why the follwowing code wont work



   For Each ws In ThisWorkbook.Worksheets
   If InStr(1, ws.Name, vbTextCompare) = 0 _
  And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
Columns("C:C").EntireColumn.AutoFit
  ws.Columns("E:H").Select
   ws.Selection.ColumnWidth = 13.86
  ws.Columns("L:L").ColumnWidth = 40
 ws.Columns("K:K").ColumnWidth = 4

   End If

   Next ws




End Sub

--
FORUM RULES (986+ 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.


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com 


--
FORUM RULES (986+ 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. 


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ loop through cell

2012-03-06 Thread LearnExcel
help with code


Dim ws As Worksheet

can someone tell me why the follwowing code wont work



For Each ws In ThisWorkbook.Worksheets
If InStr(1, ws.Name, vbTextCompare) = 0 _
   And InStr(1, ws.Name, "Doc", vbTextCompare) = 0 Then
 Columns("C:C").EntireColumn.AutoFit
   ws.Columns("E:H").Select
ws.Selection.ColumnWidth = 13.86
   ws.Columns("L:L").ColumnWidth = 40
  ws.Columns("K:K").ColumnWidth = 4

End If

Next ws




End Sub

-- 
FORUM RULES (986+ 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. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Loop through count and add date

2009-06-18 Thread wongsol

Hello:

I'll try to explain as best I can.

I have a spreadsheet with a column that have numeric values.  What I
need to do is loop through these values to a sum no greater than 5000
(doesn't matter in which order); the tricky part that I have no idea
where to start is to enter a date in the adjacent cell of all affected
cells that comprised this sum.  This date would be working backwards
from a predetermined date; something like =MIN(range)-1.

So a column with values would have the following dates associated as
the sum is as close to 5000 but no more than 5000

191 15-Sep
235 15-Sep
328 15-Sep
534 15-Sep
112 15-Sep
155 15-Sep
173 15-Sep
203 15-Sep
238 15-Sep
1   15-Sep
14  15-Sep
57  15-Sep
347 15-Sep
48  15-Sep
257 15-Sep
301 15-Sep
307 15-Sep
513 15-Sep
386 15-Sep
401 15-Sep
57  15-Sep
150 14-Sep
52  15-Sep
187 14-Sep
77  14-Sep
82  15-Sep
2   14-Sep
156 14-Sep
270 14-Sep
474 14-Sep
3   14-Sep
156 14-Sep
277 14-Sep
280 14-Sep
215 14-Sep
445 14-Sep
885 14-Sep
457 14-Sep
414 14-Sep
277 14-Sep


...any ideas?

TIA

--~--~-~--~~~---~--~~
-
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-
-~--~~~~--~~--~--~---