$$Excel-Macros$$ Re: Date Issue

2015-11-23 Thread Bill Q
Close but know. All dates in the "source" are actually in 2015. See my 
dilemma ?


 

On Sunday, 22 November 2015 22:40:48 UTC-5, Bill Q wrote:
>
>
>
> PSA.
>
> Can someone please create a macro for me that would eliminate this 
> frustrating problem that I have with date converstion. 
>
> DATE1 = Source. It always gets imported in as 2 different date formats.
>
> DATE2 is what I want returned in a MMDD format. I have manually change 
> it in this example.
>
>
>
> Thanks. 
>

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


$$Excel-Macros$$ Re: Date Issue

2015-11-23 Thread Mandeep Baluja
What please see your dates which i copied from your sheet how 2010 year 
will be 2015 ? ?

DATE1 15-10-2010 15-12-2010 10/14/15 10/16/15 10/18/15 10/22/15 10/24/15 
10/26/15 10/27/15 10/29/15 15-01-2011 15-04-2011 15-06-2011 15-07-2011 
15-09-2010 15-10-2010 10/14/15 10/15/15 10/17/15 10/20/15 10/22/15 10/24/15 
10/26/15 10/27/15 10/30/15 15-05-2011 15-07-2011 15-08-2010 15-10-2010 
15-12-2010 10/14/15 10/17/15 10/21/15 10/23/15 10/27/15 10/30/15 10/31/15 
15-03-2011 15-05-2011 15-07-2011 15-08-2010 15-10-2010 15-12-2010 10/15/15 
10/17/15 10/21/15 10/23/15 10/24/15 10/27/15 10/29/15 10/30/15 15-01-2011 
15-05-2011 15-07-2011 15-07-2010 15-10-2010 10/13/15 10/16/15 10/17/15 
10/20/15 10/23/15 10/25/15 10/26/15 10/28/15 10/30/15 10/31/15 15-03-2011 
15-05-2011 15-07-2011 15-08-2010 15-10-2010 10/13/15 10/16/15 10/17/15 
10/21/15 10/23/15 10/24/15 10/27/15 10/29/15 10/30/15 15-01-2011 15-06-2011 
15-07-2011 15-07-2010 15-09-2010 15-10-2010 10/14/15 10/15/15 10/17/15 
10/22/15 10/24/15 10/26/15 10/29/15 10/30/15 15-02-2011 15-04-2011 
15-06-2011 15-08-2010 15-10-2010 10/14/15 10/16/15 10/18/15 10/21/15 
10/24/15 10/27/15 10/29/15 10/30/15 15-01-2011 15-03-2011 15-05-2011 
15-06-2011 15-09-2010 15-10-2010 15-12-2010 10/14/15 10/16/15 10/17/15 
10/20/15 10/22/15 10/24/15 10/27/15 10/30/15 10/31/15 15-03-2011 15-05-2011 
15-06-2011 15-08-2010 15-10-2010 10/13/15 10/15/15 10/17/15 10/20/15 
10/22/15 10/24/15 10/27/15 10/29/15 10/31/15 15-02-2011 15-03-2011 
15-06-2011 15-09-2010 15-10-2010 10/13/15 10/16/15 10/17/15 10/21/15 
10/23/15 10/24/15 10/27/15 10/30/15 10/31/15 15-03-2011 15-06-2011 
15-08-2010 15-10-2010 10/13/15 10/15/15 10/17/15 10/18/15 10/21/15 10/23/15 
10/25/15 10/27/15 10/29/15 10/31/15 15-03-2011 15-06-2011 15-10-2010 
15-12-2010 10/13/15 10/15/15 10/17/15 10/20/15 10/22/15 10/24/15 10/27/15 
10/30/15 10/31/15 15-04-2011 15-05-2011 15-07-2011 15-07-2010 15-09-2010 
10/13/15 10/16/15 10/18/15 10/22/15 10/23/15 10/25/15 10/27/15 10/31/15 
15-02-2011 15-03-2011 15-05-2011 15-07-2011 15-08-2010 15-10-2010 10/15/15 
10/16/15 10/18/15 10/22/15 10/24/15 10/25/15 10/27/15 10/30/15 10/31/15 
15-05-2011 15-07-2011 15-07-2010 15-10-2010 15-11-2010 10/13/15 10/15/15 
10/17/15 10/20/15 10/23/15 10/24/15 10/27/15 10/29/15 10/30/15 15-01-2011 
15-03-2011 15-05-2011 15-07-2011 15-08-2010 15-10-2010 10/13/15 10/15/15 
10/17/15 10/20/15 10/22/15 10/24/15 10/28/15 10/31/15 15-01-2011 15-05-2011 
15-07-2011 15-09-2010 15-10-2010 10/13/15 10/16/15 10/18/15 10/20/15 
10/22/15 10/24/15 10/27/15 10/29/15 10/31/15 15-03-2011 15-06-2011 
15-09-2010 15-10-2010 15-12-2010 10/15/15 10/17/15 10/20/15 10/23/15 
10/24/15 10/26/15 10/29/15 10/31/15 15-01-2011 15-03-2011 15-05-2011 
15-07-2010 15-09-2010 15-10-2010 10/13/15 10/15/15 10/18/15 10/19/15 
10/22/15 10/24/15 10/25/15 10/30/15 15-03-2011 15-06-2011 15-07-2011 
15-08-2010 15-10-2010 15-11-2010 10/14/15 10/15/15 10/17/15 10/22/15 
10/24/15 10/28/15 10/30/15 10/31/15 15-03-2011 15-05-2011 15-07-2011 
15-08-2010 15-10-2010 15-12-2010 10/14/15 10/20/15 10/21/15 10/24/15 
10/27/15 10/29/15 10/30/15 15-02-2011 15-03-2011 15-05-2011 15-07-2011 
15-08-2010 15-10-2010 10/13/15 10/15/15 10/17/15 10/20/15 10/22/15 10/24/15 
10/28/15 10/29/15 10/31/15 15-04-2011 15-06-2011 15-07-2011 15-07-2010 
15-10-2010 10/13/15 10/16/15 10/17/15 10/19/15 10/22/15 10/24/15 10/28/15 
10/31/15 15-01-2011 15-03-2011 15-05-2011 15-07-2011 15-08-2010 15-10-2010 
10/13/15 10/15/15 10/16/15 10/18/15 10/20/15 10/24/15 10/27/15 10/29/15 
10/31/15 15-03-2011 15-04-2011 15-07-2011 15-08-2010 15-10-2010 15-12-2010 
10/13/15 10/15/15 10/17/15 10/20/15 10/23/15 10/24/15 10/27/15 10/29/15 
10/31/15 15-01-2011 15-03-2011 15-05-2011 15-07-2011 15-07-2010 15-09-2010 
15-10-2010 10/16/15 10/17/15 10/21/15 10/24/15 10/26/15 10/30/15 10/31/15 
15-02-2011 15-04-2011 15-06-2011 15-07-2011 15-07-2010 15-10-2010 15-12-2010 
10/13/15 10/16/15 10/18/15 10/22/15 10/24/15 10/27/15 10/29/15 10/30/15 
15-02-2011 15-04-2011 15-07-2011 15-10-2010 10/13/15 10/15/15 10/17/15 
10/20/15 10/22/15 10/23/15 10/28/15 10/30/15 10/31/15 15-03-2011 15-05-2011 
15-07-2011 15-08-2010 15-09-2010 15-12-2010 10/13/15 10/16/15 10/18/15 
10/23/15 10/25/15 10/27/15 10/29/15 10/31/15 15-01-2011 15-04-2011 
15-05-2011 15-07-2011 

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

Re: $$Excel-Macros$$ Re: Date Issue

2015-11-23 Thread Paul Schreiner
You said:DATE1 = Source. It always gets imported in as 2 different date formats.
I SUSPECT that your source data has a date in a specific format like:
mm/dd/yy
but your Windows Regional settings are set to a date format that is something 
else.Like:dd/mm/yy
So, when you read in values, if the value matches what Excel/Windows thinks is 
a date, Excel converts the text string to a proper Excel "date".
The problem is, MY windows setting is mm/dd/When I opened your file, Excel 
converts the data to MY preferred format.So, the first few records looks to ME 
like:
DATE1   DATE2
10/15/2010 20151010
12/15/2010 20151012
10/14/15 20151014
10/16/15 20151016
10/18/15 20151018
See? the first two dates are converted to mm/dd/
Basically, I think your source data isn't in the same format as your Windows 
default date format.
If the MONTH value is less than 12, then Excel thinks it's a valid date.If the 
month is MORE than 12, then it's not a valid date and is stored as text.
So, I think we need to go back to your data source.
What does this file look like?is it a text file?Can you open it as text, then 
use a formula or macro to convert it to a date in the proper format?
BTW: If excel recognizes a value as a date, it converts it to a number.(the 
number of days since 1/1/1900)Once converted, you can DISPLAY this number in 
any way you'd like.
November 23, 2015 is42331
11/23/2015
Monday, November 23, 2015
23-Nov
20151123
These are all the same date, simply changed the cell formatting.


 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
-
 
  From: Bill Q <ronsmith...@gmail.com>
 To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com> 
 Sent: Monday, November 23, 2015 7:29 AM
 Subject: $$Excel-Macros$$ Re: Date Issue
   
Close but know. All dates in the "source" are actually in 2015. See my 
dilemma ?

 



On Sunday, 22 November 2015 22:40:48 UTC-5, Bill Q wrote:


PSA.
Can someone please create a macro for me that would eliminate this frustrating 
problem that I have with date converstion. 
DATE1 = Source. It always gets imported in as 2 different date formats.
DATE2 is what I want returned in a MMDD format. I have manually change it 
in this example.


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


   

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

2015-11-23 Thread Paul Schreiner
I'm sorry, I show that I sent the response directly to you.
For the group:
The problem seems to be with the multiple entry records.
The maximum number of characters that can be put in a cell is 255.
Your record #470044012 has too many duplicates.The string length becomes 411. 
You will need to decide how you want to handle this situation.
Since I don't know how you are using this workbook, I'm not sure what to 
recommend as a solution.
What you COULD do is to have this simply show a COUNT of records, then 
double-clicking the row will cause the data sheet to filter the specific record 
set.
or many other options.
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
-
 
  From: Mandeep Baluja 
 To: MS EXCEL AND VBA MACROS  
Cc: schreiner_p...@att.net
 Sent: Monday, November 23, 2015 2:01 AM
 Subject: Re: $$Excel-Macros$$ Dictionary_Query
   
Any update >??

On Thursday, November 19, 2015 at 1:34:51 PM UTC+5:30, Mandeep Baluja wrote:
Hi paul, 
But while correcting it this is giving error. please find the attached file. it 
works on small amount of data easily but while using the data in sheet it gives 
error. I admit by mistake i put demo in the code. 
Regards,Mandeep baluja 




On Wednesday, November 18, 2015 at 6:07:13 PM UTC+5:30, Paul Schreiner wrote:
First:at the beginning of each module, use:
Option Explicit
(or in VB Editor, use Tools->Options and select "Require Variable Declaration")
This will ensure that you "declare" each variable and don't unintentionally 
mis-spell a variable and thereby create a new variable.
Now, once I added your sub to my own workbook, I found several variables that 
did not appear in a Dim statement.
Now, perhaps you have these declared as "Public" or outside of this macro?
Specifically, I found:
i, arr, Arr1, d, Demo
What is "Demo" ??In this macro, you're not using it elsewhere, so when the 
statement:
Sheet2.Range("b1").Resize( UBound(Demo), 1) = Application.Transpose(Arr1)runs, 
ubound(Demo) would be "empty"
Without the "Option Explicit", VBA would automatically declare it as a type 
Variant.It is necessary for the variable in the UBound() function to be an 
array.If the variable is a "Variant", then the Ubound() function would indicate 
that the variable type does not "match" the type required.
I suspect that you INTENDED the statement to be:
Sheet2.Range("b2").Resize( UBound(Arr1), 1) = Application.Transpose(Arr1)
(note: also changed to "b2" rather than "b1")
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
-- ---
 
  From: Mandeep Baluja 
 To: MS EXCEL AND VBA MACROS  
 Sent: Wednesday, November 18, 2015 5:58 AM
 Subject: $$Excel-Macros$$ Dictionary_Query
   
Hi paul, 
Will you please help me to learn this thing why this code gives error line was 
highlighted with comment you can search it with question mark in code ,I have 
alternatives to do this but why that line gives error but not the above ones.

Sub Dictionary_Example()            '- 
-- --    Dim Dic_obj    As Object:  'This is a 
Dictionary object    Dim lrow       As Long:       'Find out the Last row    
'- -- --            
'Create a dictionary object    Set Dic_obj = CreateObject("scripting. 
dictionary")        'Clear the dictonary object    Dic_obj.RemoveAll        
With ActiveSheet        lrow = .Cells(Rows.Count, 1).End(xlUp).Row            
For i = 2 To lrow                If (Not (Dic_obj.exists(Cells(i, 1).Value))) 
Then                    Dic_obj.Add Cells(i, 1).Value, Cells(i, 2).Value        
        Else                    Dic_obj.Item(Cells(i, 1).Value) = 
Dic_obj.Item(Cells(i, 1).Value) & "-" & Cells(i, 2).Value                End If 
           Next        'This is one dimensional array arr(0,659)    'Note:- 
Whenever keys copied into array it always one dimensional with lower bound 0    
'By using Transpose we will make it single dimensional    arr = Dic_obj.keys    
    'Pasting it on the Sheet2 only unique keys    Sheet2.Range("a2").Resize( 
UBound(arr), 1) = Application.Transpose(arr)        'Find out the Error    arr1 
= Dic_obj.items        'While running this below line We get an error type 
mismatch Why?? Because i don't want to run this below loop, _    for retrieving 
items from those keys.        'Sheet2.Range("b1").Resize( UBound(Demo), 1) = 
Application.Transpose(Arr1)        d = Dic_obj.Count        

Re: $$Excel-Macros$$ Re: Date Issue

2015-11-23 Thread Paul Schreiner
Mandeep:
I think the problem is that his default date format is different from our 
own.(and HIS default date format is different than the source date format)
I suspect his original date records are sequential:10-Oct-2015
12-Oct-2015
14-Oct-2015
16-Oct-2015
18-Oct-2015
22-Oct-2015
24-Oct-2015
26-Oct-2015
27-Oct-2015
29-Oct-2015
01-Nov-2015
04-Nov-2015
06-Nov-2015
07-Nov-2015
But since his source data format does not match his system date format,October 
is being interpreted as 2010and the DAY is being interpreted as the month.That 
converts to a legitimate date when the day is less than 12,but for day #14, the 
source data doesn't a possible date format, so Excel doesn't convert it to a 
date.
For example:For the second row, what you and I see as 15-12-2010 (or 12/15/2010 
in my case)
is really October 12, 2015

from what I can tell (from the text strings in row 4-11)the source data is in 
mm/dd/yy format,but his system date is set to yy/mm/dd format

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
-
 
  From: Mandeep Baluja 
 To: MS EXCEL AND VBA MACROS  
 Sent: Monday, November 23, 2015 8:11 AM
 Subject: $$Excel-Macros$$ Re: Date Issue
   
What please see your dates which i copied from your sheet how 2010 year will be 
2015 ? ?

| DATE1 |
| 15-10-2010 |
| 15-12-2010 |
| 10/14/15 |
| 10/16/15 |
| 10/18/15 |
| 10/22/15 |
| 10/24/15 |
| 10/26/15 |
| 10/27/15 |
| 10/29/15 |
| 15-01-2011 |
| 15-04-2011 |
| 15-06-2011 |
| 15-07-2011 |
| 15-09-2010 |
| 15-10-2010 |
| 10/14/15 |
| 10/15/15 |
| 10/17/15 |
| 10/20/15 |
| 10/22/15 |
| 10/24/15 |
| 10/26/15 |
| 10/27/15 |
| 10/30/15 |
| 15-05-2011 |
| 15-07-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 15-12-2010 |
| 10/14/15 |
| 10/17/15 |
| 10/21/15 |
| 10/23/15 |
| 10/27/15 |
| 10/30/15 |
| 10/31/15 |
| 15-03-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 15-12-2010 |
| 10/15/15 |
| 10/17/15 |
| 10/21/15 |
| 10/23/15 |
| 10/24/15 |
| 10/27/15 |
| 10/29/15 |
| 10/30/15 |
| 15-01-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-07-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/16/15 |
| 10/17/15 |
| 10/20/15 |
| 10/23/15 |
| 10/25/15 |
| 10/26/15 |
| 10/28/15 |
| 10/30/15 |
| 10/31/15 |
| 15-03-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/16/15 |
| 10/17/15 |
| 10/21/15 |
| 10/23/15 |
| 10/24/15 |
| 10/27/15 |
| 10/29/15 |
| 10/30/15 |
| 15-01-2011 |
| 15-06-2011 |
| 15-07-2011 |
| 15-07-2010 |
| 15-09-2010 |
| 15-10-2010 |
| 10/14/15 |
| 10/15/15 |
| 10/17/15 |
| 10/22/15 |
| 10/24/15 |
| 10/26/15 |
| 10/29/15 |
| 10/30/15 |
| 15-02-2011 |
| 15-04-2011 |
| 15-06-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 10/14/15 |
| 10/16/15 |
| 10/18/15 |
| 10/21/15 |
| 10/24/15 |
| 10/27/15 |
| 10/29/15 |
| 10/30/15 |
| 15-01-2011 |
| 15-03-2011 |
| 15-05-2011 |
| 15-06-2011 |
| 15-09-2010 |
| 15-10-2010 |
| 15-12-2010 |
| 10/14/15 |
| 10/16/15 |
| 10/17/15 |
| 10/20/15 |
| 10/22/15 |
| 10/24/15 |
| 10/27/15 |
| 10/30/15 |
| 10/31/15 |
| 15-03-2011 |
| 15-05-2011 |
| 15-06-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/15/15 |
| 10/17/15 |
| 10/20/15 |
| 10/22/15 |
| 10/24/15 |
| 10/27/15 |
| 10/29/15 |
| 10/31/15 |
| 15-02-2011 |
| 15-03-2011 |
| 15-06-2011 |
| 15-09-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/16/15 |
| 10/17/15 |
| 10/21/15 |
| 10/23/15 |
| 10/24/15 |
| 10/27/15 |
| 10/30/15 |
| 10/31/15 |
| 15-03-2011 |
| 15-06-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/15/15 |
| 10/17/15 |
| 10/18/15 |
| 10/21/15 |
| 10/23/15 |
| 10/25/15 |
| 10/27/15 |
| 10/29/15 |
| 10/31/15 |
| 15-03-2011 |
| 15-06-2011 |
| 15-10-2010 |
| 15-12-2010 |
| 10/13/15 |
| 10/15/15 |
| 10/17/15 |
| 10/20/15 |
| 10/22/15 |
| 10/24/15 |
| 10/27/15 |
| 10/30/15 |
| 10/31/15 |
| 15-04-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-07-2010 |
| 15-09-2010 |
| 10/13/15 |
| 10/16/15 |
| 10/18/15 |
| 10/22/15 |
| 10/23/15 |
| 10/25/15 |
| 10/27/15 |
| 10/31/15 |
| 15-02-2011 |
| 15-03-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 10/15/15 |
| 10/16/15 |
| 10/18/15 |
| 10/22/15 |
| 10/24/15 |
| 10/25/15 |
| 10/27/15 |
| 10/30/15 |
| 10/31/15 |
| 15-05-2011 |
| 15-07-2011 |
| 15-07-2010 |
| 15-10-2010 |
| 15-11-2010 |
| 10/13/15 |
| 10/15/15 |
| 10/17/15 |
| 10/20/15 |
| 10/23/15 |
| 10/24/15 |
| 10/27/15 |
| 10/29/15 |
| 10/30/15 |
| 15-01-2011 |
| 15-03-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-08-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/15/15 |
| 10/17/15 |
| 10/20/15 |
| 10/22/15 |
| 10/24/15 |
| 10/28/15 |
| 10/31/15 |
| 15-01-2011 |
| 15-05-2011 |
| 15-07-2011 |
| 15-09-2010 |
| 15-10-2010 |
| 10/13/15 |
| 10/16/15 |
| 10/18/15 |
| 10/20/15 |
| 10/22/15 |
| 10/24/15 |
| 10/27/15 |
| 10/29/15 |
| 10/31/15 |
| 15-03-2011 |
| 15-06-2011 |
| 

Re: $$Excel-Macros$$ Re: Date Issue

2015-11-23 Thread Paul Schreiner
OK, here's a POSSIBLE solution:
Since the format of the source data does not match the current system date 
format,Excel converts any source value that COULD be a date to an Excel date, 
which is a number.
Any non-valid date is loaded as text.
So, we can either import the data as text and convert,or using what we have, 
check to see if it is a number, and change the values accordingly.
If it is NOT a number, convert the text values to a date, like:
=IF(ISNUMBER(A2),
    DATE("20"(A2),TEXT(YEAR(A2),"yy"),MONTH(A2)),
    DATE("20"(A2,2),LEFT(A2,2),MID(A2,4,2)))
changing the cell format to mmddwill result in values like:
20151012 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
-
 
  From: Bill Q 
 To: MS EXCEL AND VBA MACROS  
 Sent: Monday, November 23, 2015 7:29 AM
 Subject: $$Excel-Macros$$ Re: Date Issue
   
Close but know. All dates in the "source" are actually in 2015. See my 
dilemma ?

 



On Sunday, 22 November 2015 22:40:48 UTC-5, Bill Q wrote:


PSA.
Can someone please create a macro for me that would eliminate this frustrating 
problem that I have with date converstion. 
DATE1 = Source. It always gets imported in as 2 different date formats.
DATE2 is what I want returned in a MMDD format. I have manually change it 
in this example.


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


   

-- 
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$$ Re: Date Issue

2015-11-23 Thread Bill Q
I will try that when I get home tonight.

Thanks Paul.

On Monday, 23 November 2015 08:12:27 UTC-5, Paul Schreiner wrote:
>
> You said:
> DATE1 = Source. It always gets imported in as 2 different date formats.
>
> I SUSPECT that your source data has a date in a specific format like:
>
> mm/dd/yy
>
> but your Windows Regional settings are set to a date format that is 
> something else.
> Like:
> dd/mm/yy
>
> So, when you read in values, if the value matches what Excel/Windows 
> thinks is a date, Excel converts the text string to a proper Excel "date".
>
> The problem is, MY windows setting is mm/dd/
> When I opened your file, Excel converts the data to MY preferred format.
> So, the first few records looks to ME like:
>
> DATE1   DATE2
> 10/15/2010 20151010
> 12/15/2010 20151012
> 10/14/15 20151014
> 10/16/15 20151016
> 10/18/15 20151018
>
> See? the first two dates are converted to mm/dd/
>
> Basically, I think your source data isn't in the same format as your 
> Windows default date format.
>
> If the MONTH value is less than 12, then Excel thinks it's a valid date.
> If the month is MORE than 12, then it's not a valid date and is stored as 
> text.
>
> So, I think we need to go back to your data source.
>
> What does this file look like?
> is it a text file?
> Can you open it as text, then use a formula or macro to convert it to a 
> date in the proper format?
>
> BTW: If excel recognizes a value as a date, it converts it to a number.
> (the number of days since 1/1/1900)
> Once converted, you can DISPLAY this number in any way you'd like.
>
> November 23, 2015 is
> 42331
> 11/23/2015
> Monday, November 23, 2015
> 23-Nov
> 20151123
>
> These are all the same date, simply changed the cell formatting.
>
>
>  
> *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*
> -
>
> --
> *From:* Bill Q <ronsm...@gmail.com >
> *To:* MS EXCEL AND VBA MACROS <excel-...@googlegroups.com > 
> *Sent:* Monday, November 23, 2015 7:29 AM
> *Subject:* $$Excel-Macros$$ Re: Date Issue
>
> Close but know. All dates in the "source" are actually in 2015. See my 
> dilemma ?
>
>
>  
>
>
>
> On Sunday, 22 November 2015 22:40:48 UTC-5, Bill Q wrote:
>
>
>
> PSA.
>
> Can someone please create a macro for me that would eliminate this 
> frustrating problem that I have with date converstion. 
>
> DATE1 = Source. It always gets imported in as 2 different date formats.
>
> DATE2 is what I want returned in a MMDD format. I have manually change 
> it in this example.
>
>
>
> Thanks. 
>
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to excel-...@googlegroups.com 
> .
> Visit this group at http://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) D

$$Excel-Macros$$ Re: keyboard shortcut by dragging for copying

2015-11-23 Thread Mandeep Baluja
First thing you need to know is there is no shortcut to click that Plus 
button, The functionality which is used there is autofill, But you can use 
this shortcut to do the auto fill ALT+E+I+S  then ALT+F enter or Ctrl+D is 
the best, Best functionality of + sign pressing it copies the data to last 
used range cell. If you wish you can create macro for the same then it 
works on used range property. 
check this sheet which contains a macro as per your requirement 

CTRL+SHIFT+J is shortcut to run the macro. 

it avoid  first select the range (i.e. 500,000 rows)  criteria. because it 
works on used range parameter same as +plus sign work which is autofill

Regards, 
Mandeep baluja 






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


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


$$Excel-Macros$$ Re: Date Issue

2015-11-23 Thread Bill Q
I played around with my system date format and finally got it right.

Thanks Paul & Mandeep 

On Sunday, 22 November 2015 22:40:48 UTC-5, Bill Q wrote:
>
>
>
> PSA.
>
> Can someone please create a macro for me that would eliminate this 
> frustrating problem that I have with date converstion. 
>
> DATE1 = Source. It always gets imported in as 2 different date formats.
>
> DATE2 is what I want returned in a MMDD format. I have manually change 
> it in this example.
>
>
>
> Thanks. 
>

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


$$Excel-Macros$$ Re: keyboard shortcut by dragging for copying

2015-11-23 Thread GENIUS
Suppose I want to copy it till 500,000 rows then how is it possible, if 
there is possibility then first select the range (i.e. 500,000 rows)  and 
the press CTRL+D but i dont want to select the range, I just press the cona 
of the cell so that it copies till A50, I think you understand my point 
I just want to double click at the plus sign as shown in the figure
 

> *Izhar Ul Haq*
>
>
>
> Cell# 009203069072597
>

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

2015-11-23 Thread Mandeep Baluja
But paul Excel allows you to enter up to 32,767 characters in each cell. 
its just 411 then why the error is showing.  

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