• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Maximum date from range of acno vba

vivek pare

New Member
Acno , date ,dr ,cr bal
100,12.01.2021 1000 , 1245.50
100 12.03.2021 1000 2245.50
100 12.07.2921 1000 3345.50
101
I am having acno records with transaction in each acno I want to write a flag as true if maximum date found in acno range as in 100 it is 12.07.21 like wise in another range of 101,102 1000 rows of accounts
Sir vba help
Vivek pare
 
With Power Query, attached you can review a solution that provides the requested results. Look at the merge tab and then review the PQ steps by clicking on Queries and Connections on the Data Tab
 

Attachments

  • PQ Max is True.xlsx
    31.9 KB · Views: 4
kindly look the attached excel sheet vba macro to read account number range and found maximum date and put flag as true to extract data manually
 

Attachments

  • book2.xlsx
    25.3 KB · Views: 4
sir
the result are printed in account nos but they are printed as below
21435110000003​
21435110000004​
 

Attachments

  • vivek pare.xlsb
    27.6 KB · Views: 5
Please explain how the value in the Max Date column is arrived. What is the criteria for your expected result.
 
Excel 2016 (Windows) 32 bit

A
B
C
D
E
F
1
AC NoTable1 (2).DateTable1 (2).DrTable1 (2).CrTable1 (2).BalTRUE
2
100​
12/1/2021​
1000​
0​
1245.5​
3
100​
12/3/2021​
1000​
0​
2245.5​
4
100​
12/7/2021​
1000​
0​
3245.5​
TRUE
5
101​
12/1/2021​
100​
0​
500​
6
101​
12/3/2021​
2500​
0​
3000​
7
101​
12/5/2021​
600​
0​
3600​
TRUE

Sheet: Merge1
 
Did you look at solution in Post #3 which I have extracted for you in Post #12 the results. Isn't this what you are looking for? Yet you have not commented on it at all.
 
If you use Power Query, it automatically updates when you add or delete to your source table.

Read here about Power Query

 
vivek pare
About Your I just want true in column where maximum date found
... hmm? ... that would overwrite that date ... hmm?
H-column has TRUE, if there is valid maximum date.
... If not, then those ACNOs will stay in J-column.
Your #10 ... I've to skip.
Yes sir thank you it is the exact result I want sir thank you so much
 
I am not getting the code
Xacno=acno
Count same ac no and move date into dynamic array
Then get maximum date from subscript and put true
Initialise all variables
And start with new subsets of acno
In loop
Sir this is in my mind but I can not materialize
Therefore I need help
Kindly help me
Vivek pare
 
Maxifs function not supported by excel
Hi,​
I suppose last vletm code may not work on your side but as you forgot to mention which Excel version you use and on which platform (OS) …​
As a reminder important informations must be in the initial post with an explanation at the level of any Excel forum expects for :​
complete, crystal clear and with an attachment well reflecting the before state and the expected result,​
all the necessay in order there is nothing to guess as after all, any Excel forum is not some mind readers forum !​
 
Moderator note: You should use capital letter as those should use - now, You're shouting.

SIR OFFICE 2010
RUN TIME ERROR 438 OCCURED RUMMING ANOTHER CODE WITH SORT AT BELOW LINE WHILE DEBUGGING WITH F8 KEY
>>> use code - tags <<<
Code:
.SortFields.Add2 Key:=Range("A2:A" & a_max), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
 
Last edited by a moderator:
>>> as written above <<<
>>> use code - tags <<<

object does not support error 438 this property or method occured
not running
 
Last edited by a moderator:
Back
Top