Hi . i want to use this formula =SUMPRODUCT((A2:A10000<>"")/COUNTIF(A2:A10000,A2:A10000&"")) on cell D10 in sheet 1, how do i write it using vba ?? can some one help
Hi . i want to use this formula =SUMPRODUCT((A2:A10000<>"")/COUNTIF(A2:A10000,A2:A10000&"")) on cell D10 in sheet 1, how do i write it using vba ?? can some one help
Like this:
![]()
Please Login or Register to view this content.
Hi plk,
Try this:
HTH![]()
Please Login or Register to view this content.
Robert
____________________________________________
Please ensure you mark your thread as Solved once it is. Click here to see how
If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post
I would cheat:
![]()
Please Login or Register to view this content.
... but at least you know exactly what you are getting and why.
If the formula works, you'll get the value you expect.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Or if you want it in the cell as the above answers suggest:
![]()
Please Login or Register to view this content.
Hi ALL thanks for your reply..i have the formula used in sheet2 to calculate unique rows and i want the result to be displayed on D10 cell in sheet 1 .. can any one help.. thanks
Is that a different question? If it is, you should start a new thread.
Either way, I don't understand what you want, so please provide a more detailed explanation and, ideally, a sample workbook with a mock of what you hope to achieve.
Regards, TMS
Just link cell D10 of Sheet1 to the relevant cell in Sheet2, i.e. if your formula is housed in cell A5 of Sheet2, you'd use this in cell D10 of Sheet1:i have the formula used in sheet2 to calculate unique rows and i want the result to be displayed on D10 cell in sheet 1
=Sheet2!A5
Just change the cell reference (i.e. A5) to suit.
Hi all i have just attached a sample workbook, can you please help me to implement the formula on Macro to solve this problem.. and this is the same thread with same question. thanks
Hi plk,
Try this:
Note there are nine unique entries, not eight as the data starts from row one, not row two as your formula stated. I've also included code to find the last row from column A.![]()
Please Login or Register to view this content.
HTH
Robert
thanks a lot trebor.. i managed with ur earlier formula and gave the reference manually now i will change the reference to code.. thanks a lot for your timely help u made my day..i wouldnot forget this..thanks a lot...
Hi plk,
Thanks for the feedback and for adding to my reputation. I'm glad it's all sorted now.
Regards,
Robert
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks