Hello,
Although I have some experience with Excel, I'm still a beginner. I've been really trying with this one, but I'm stuck.
I've recorded some data on how often I've filled the car up with petrol in 2017, when, by whom, where, how much it cost, etc.
If you look at screenshot 1, the cell highlighted (C42) is what I'm currently having trouble filling. Before that, I had trouble filling in the one above (C41). My dad created a macro to deal with this, but I wondered if there was a way to do it without using macros. Proceeding with the current problem (that of C42), I decided to see if creating some extra rows below (which I intend to hide in the end) may help work everything out (see screenshot 2). I actually manged to fill C41 using these rows instead of the macro, however I'm still struggling to fill C42.
To fill C42, I need to look in row 28 for the month stored in B46:B57, sum the costs that correspond to that month, then store it in D46:D57. Then, to get the average I need to sum the costs that are greater than 0, and divide that by the number of costs that are greater than 0.
Am I correct? If so, how do I do that? It's got to be possible without VBA, but I'm just unsure how. I thought it might have something to do with V/HLookup, or IndexMatch, or IndexMatchMatch (all of which I'm still a little unfamiliar with), but I'm not sure. Please help!
Thank you very much,
Chris
Bookmarks