Re: $$Excel-Macros$$ Need Macro/Solution for the attached sheet

2016-04-28 Thread vikas khen
Hi Experts!!!

Any Hope regarding on this??

Warm Regards,
Vikkhe1

On Thu, Apr 28, 2016 at 6:55 PM, vikas khen  wrote:

> Hi Team,
>
>
>
> Please find the attached sheet in which there are two different sheets one
> is INPUT and other one is required OUTPUT  based on input sheet.
>
>
>
> Also I need specific word from Input sheet (ENTRY or EXIT) and reflect the
> same in to status row i.e. on E Column respectively.
>
>
>
>
>
> Your help on this will be very much appreciated
>
> --
> 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 https://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


Re: $$Excel-Macros$$ Finding Overlapping dates

2016-04-28 Thread Atul Kesaria
Hi Team,

Just wanted to check if you have found any solution.

Regards
Atuk

On Wed, Apr 27, 2016 at 10:35 PM, Atul Kesaria 
wrote:

> Hello Team,
>
> I need a help to fit in a formula to find if there are any overlapping
> dates for multiple date range. Please note that column can increase or
> decrease.
>
> Attached is the sample spreadsheet.
>
> Thanking in advance.
>
> Regards
> Atul
>
> --
> 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 https://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


$$Excel-Macros$$ Need Macro/Solution for the attached sheet

2016-04-28 Thread vikas khen
Hi Team,



Please find the attached sheet in which there are two different sheets one
is INPUT and other one is required OUTPUT  based on input sheet.



Also I need specific word from Input sheet (ENTRY or EXIT) and reflect the
same in to status row i.e. on E Column respectively.





Your help on this will be very much appreciated

-- 
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 https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


New Microsoft Excel Worksheet.xlsx
Description: MS-Excel 2007 spreadsheet


Re: $$Excel-Macros$$ Macro error in opening file

2016-04-28 Thread Paul Schreiner
I simplified the macros wrote two versions.One using Dir() and another with the 
FileSystem object.
they both work just fine:
Sub First_Macro()
    Dim MyFile As String
    Dim path As String
    
    path = "D:\For Pankaj\Dump\"
    MyFile = Dir(path & "*L1.xlsx")
    
    Do While MyFile <> ""
    Workbooks.Open (path & MyFile)
    MyFile = Dir()
    Loop
End SubSub fSys_Macro()
    Dim f, fldr, fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fldr = fso.getfolder("D:\For Pankaj\Dump")
    For Each f In fldr.Files
    If (InStr(1, f.Name, "L1") > 0) Then Workbooks.Open f.path
    Next f
End Sub
 Paul-
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
- 

On Wednesday, April 27, 2016 4:05 PM, Secret Shot  
wrote:
 
 

 Dear Experts,
I want to open all files in a folder with suffix of "L1", where i have below 
files in a folder
04 L1.Xlsx04 L2.Xlsx05 L1.Xlsx05 L2.Xlsx06 L1.Xlsx06 L2.Xlsx

I want macro to open Only files which contain "L1", (Means 04 L1.Xlsx, 05 
L1.Xlsx, 06 L1.Xlsx).
I created 2 macros but both giving me same error "Run-time error '1004': Sorry, 
we couldn't find 05 L1.Xlsx. It is possible it was moved, renamed or deleted?"
Both macro are opening first file (I mean 04 L1.Xlsx) perfectly, but giving 
error on second file.
Below are the macro's 
Sub First_Macro()      Dim MyFile As String      Dim path As String        path 
= "D:\For Pankaj\Dump\"        MyFile = Dir(path & "*.xlsx")         Do While 
MyFile <> ""                If InStr(MyFile, "L1") > 0 Then                
MsgBox path & "\" & MyFile                Workbooks.Open (MyFile)        End If 
       MyFile = Dir()        Loop   End Sub 
Sub Second_Macro()Dim path As StringDim Fname As StringDim p As String
path = "D:\For Pankaj\Dump\"Fname = ".xlsx"p = "*L1"   MyFile = Dir(path & p & 
Fname)    Do While MyFile <> 0        Workbooks.Open (MyFile)        MyFile = 
Dir    LoopEnd Sub


Please help me in solving this issue. i know i am making some silly mistake but 
not able to understand why it is opening first file and giving error on second 
file. 

I would waiting for replies on this issue. 
-- 
Pankaj Pandey
Bhopal-- 
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 https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


 
  

-- 
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 https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.


Re: $$Excel-Macros$$ Macro error in opening file

2016-04-28 Thread Abhishek Jain
It is working perfectly fine at my end.

On Thu, Apr 28, 2016 at 11:36 AM, Secret Shot  wrote:

> I tried that option...  When I am using
>
> Workbooks.Open (path & MyFile)
>
> Then my loop is going in infinity and every time it is reopening the first
> file only.. Which 04 L1. Xlsx
>
> Pls suggest
> On Apr 28, 2016 11:02 AM, "Abhishek Jain"  wrote:
>
>> In your first macro, instead of:
>>
>> Workbooks.Open (MyFile)
>>
>> use:
>>
>> Workbooks.Open (path & MyFile)
>>
>> HTH
>>
>>
>> On Thu, Apr 28, 2016 at 9:26 AM, Secret Shot 
>> wrote:
>>
>>> Hi all,
>>>
>>> Can anybody pls look into it. I am really hoping that I will get
>>> resolution from this forum.
>>> On Apr 28, 2016 1:35 AM, "Secret Shot"  wrote:
>>>
 Dear Experts,

 I want to open all files in a folder with suffix of "L1", where i have
 below files in a folder

 04 L1.Xlsx
 04 L2.Xlsx
 05 L1.Xlsx
 05 L2.Xlsx
 06 L1.Xlsx
 06 L2.Xlsx

 I want macro to open Only files which contain "L1", (Means 04 L1.Xlsx,
 05 L1.Xlsx, 06 L1.Xlsx).

 I created 2 macros but both giving me same error "Run-time error
 '1004': Sorry, we couldn't find 05 L1.Xlsx. It is possible it was moved,
 renamed or deleted?"

 Both macro are opening first file (I mean 04 L1.Xlsx) perfectly, but
 giving error on second file.

 Below are the macro's

 Sub First_Macro()
   Dim MyFile As String
   Dim path As String
 path = "D:\For Pankaj\Dump\"
 MyFile = Dir(path & "*.xlsx")
  Do While MyFile <> ""
 If InStr(MyFile, "L1") > 0 Then
 MsgBox path & "\" & MyFile
 Workbooks.Open (MyFile)
 End If
 MyFile = Dir()
 Loop
End Sub

 Sub Second_Macro()
 Dim path As String
 Dim Fname As String
 Dim p As String

 path = "D:\For Pankaj\Dump\"
 Fname = ".xlsx"
 p = "*L1"

   MyFile = Dir(path & p & Fname)
 Do While MyFile <> 0
 Workbooks.Open (MyFile)
 MyFile = Dir
 Loop
 End Sub



 Please help me in solving this issue. i know i am making some silly
 mistake but not able to understand why it is opening first file and giving
 error on second file.


 I would waiting for replies on this issue.

 --
 Pankaj Pandey
 Bhopal

 --
 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 https://groups.google.com/group/excel-macros.
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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 

Re: $$Excel-Macros$$ Macro error in opening file

2016-04-28 Thread Secret Shot
I tried that option...  When I am using

Workbooks.Open (path & MyFile)

Then my loop is going in infinity and every time it is reopening the first
file only.. Which 04 L1. Xlsx

Pls suggest
On Apr 28, 2016 11:02 AM, "Abhishek Jain"  wrote:

> In your first macro, instead of:
>
> Workbooks.Open (MyFile)
>
> use:
>
> Workbooks.Open (path & MyFile)
>
> HTH
>
>
> On Thu, Apr 28, 2016 at 9:26 AM, Secret Shot  wrote:
>
>> Hi all,
>>
>> Can anybody pls look into it. I am really hoping that I will get
>> resolution from this forum.
>> On Apr 28, 2016 1:35 AM, "Secret Shot"  wrote:
>>
>>> Dear Experts,
>>>
>>> I want to open all files in a folder with suffix of "L1", where i have
>>> below files in a folder
>>>
>>> 04 L1.Xlsx
>>> 04 L2.Xlsx
>>> 05 L1.Xlsx
>>> 05 L2.Xlsx
>>> 06 L1.Xlsx
>>> 06 L2.Xlsx
>>>
>>> I want macro to open Only files which contain "L1", (Means 04 L1.Xlsx,
>>> 05 L1.Xlsx, 06 L1.Xlsx).
>>>
>>> I created 2 macros but both giving me same error "Run-time error '1004':
>>> Sorry, we couldn't find 05 L1.Xlsx. It is possible it was moved, renamed or
>>> deleted?"
>>>
>>> Both macro are opening first file (I mean 04 L1.Xlsx) perfectly, but
>>> giving error on second file.
>>>
>>> Below are the macro's
>>>
>>> Sub First_Macro()
>>>   Dim MyFile As String
>>>   Dim path As String
>>> path = "D:\For Pankaj\Dump\"
>>> MyFile = Dir(path & "*.xlsx")
>>>  Do While MyFile <> ""
>>> If InStr(MyFile, "L1") > 0 Then
>>> MsgBox path & "\" & MyFile
>>> Workbooks.Open (MyFile)
>>> End If
>>> MyFile = Dir()
>>> Loop
>>>End Sub
>>>
>>> Sub Second_Macro()
>>> Dim path As String
>>> Dim Fname As String
>>> Dim p As String
>>>
>>> path = "D:\For Pankaj\Dump\"
>>> Fname = ".xlsx"
>>> p = "*L1"
>>>
>>>   MyFile = Dir(path & p & Fname)
>>> Do While MyFile <> 0
>>> Workbooks.Open (MyFile)
>>> MyFile = Dir
>>> Loop
>>> End Sub
>>>
>>>
>>>
>>> Please help me in solving this issue. i know i am making some silly
>>> mistake but not able to understand why it is opening first file and giving
>>> error on second file.
>>>
>>>
>>> I would waiting for replies on this issue.
>>>
>>> --
>>> Pankaj Pandey
>>> Bhopal
>>>
>>> --
>>> 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 https://groups.google.com/group/excel-macros.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 https://groups.google.com/group/excel-macros.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> Are you =EXP(E:RT)