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

Vba code short but useable

Hi,
I want to use column I, and i know 5h and 6m will not direct use in code. if you use formula in code that first change column I value "5h" to 300 and then process further. as you see column P formula that convert 5h to 300 or 8h to 480 (e.g. 5 'h' *60=300) etc. after that code take value of Column P in previous code.
 
Hi ,

I doubt that this is possible ; the formula in column P is going cell by cell , so that each cell value is converted to a numeric value.

The formulae used within the VBA code are all looking at entire ranges ; having the numeric values available in a helper column P make it easy. Whether it is possible to put the entire formula , which is at present in column P , into the VBA code is difficult to say , but I have my doubts , especially since the AVERAGEIF(S) and COUNTIF(S) family of functions do not allow use of other functions in creating the ranges of interest.

What can be done is to enter the formula in column P within the code , so that the code first inserts this formula in column P , and then uses the AVERAGEIFS and COUNTIFS functions to do its present functionality.

Narayan
 
Back
Top