Forum

IF and Max Formula ...
 
Notifications
Clear all

IF and Max Formula through VBA

2 Posts
2 Users
0 Reactions
72 Views
(@kpmsivaprakasam2003)
Posts: 15
Eminent Member
Topic starter
 

Hi, I am using Excel 2013

I have applied the VBA formula but not return the results

Below formula:
=IF(ISNUMBER(I6),IF(VALUE(I6)=$L$6,MAX($H$6:$H$79),NA()),NA())

VBA:
Dim MyRange As Range
Set MyRange = Range("D5").Offset(1, 1 + 3).Resize(m + 1, 1)

Range("D5").Offset(1, 1 + 6).Formula = "=IF(ISNUMBER(" & Range("D5").Offset(1, 1 + 4).Address(0, 0) & ",IF(VALUE(" & Range("D5").Offset(1, 1 + 4).Address(0, 0) & "=" & Range("D5").Offset(1, 3 + 5).Address(1, 1) & ",MAX(" & MyRange.Address & "),NA()),NA())"

Thanks for Advance

 
Posted : 01/04/2023 3:07 am
(@debaser)
Posts: 837
Member Moderator
 

Please remember the forum rules on cross-posting and provide the links in future. Thanks.

 

stackoverflow.com/questions/75895739/if-and-max-formula-through-vba

mrexcel.com/board/threads/if-and-max-formula-through-vba.1233935/

forum.ozgrid.com/forum/index.php?thread/1233197-if-and-max-formula-through-vba/

chandoo.org/forum/threads/if-and-max-formula-through-vba.52236/

 
Posted : 01/04/2023 5:16 am
Share: