Dear Forum,
My teenager cousin plays a game FarmVille on Facebook, a wonderful game of great imagination and creativity.
He needs my help in deciding which crop should he go for in different time-slots..Now there are different slots such as these :
Harvesting Time
2 Hours
4 Hours
6 Hours
8 Hours
10 Hours
12 Hours
16 Hours
1 Day
2 Days
3 Days
4 Days
and in each time-slot different crops can be grown which can help one earn Some Cash which can help you buy things on your farm and Some XP i.e Points to go the next level.
Now both are important i.e. Sand Dollars as well as XP but then I need help in understanding which crop to go for in a given time-frame..
Please find the attachment. Sorry but my nets damn slow..so wud attach the file when my nets up....
Last edited by e4excel; 03-22-2010 at 01:04 PM.
I came up with this code but still not gettting the desired result:
INDEX('FarmVille Crops'!$C$2:$L$33,SUMPRODUCT(--('FarmVille Crops'!$F$2:$F$34=$C2)*('FarmVille Crops'!$J$2:$J$34=MAX(('FarmVille Crops'!$J$2:$J$34)*('FarmVille Crops'!$F$2:$F$34=$C2))*('FarmVille Crops'!$G$2:$G$34=MAX(('FarmVille Crops'!$G$2:$G$34)*('FarmVille Crops'!$F$2:$F$34=$C2)))),ROW('FarmVille Crops'!$J$2:$J$34))-1,1)
The problems of giving priority to XP over SanD Dollars..
If i have two Crops with the same profit but one has more XP than the other than naturally the one with the XP would get selected however if the XP is more and theres minor difference in the Sand Dollars then too I want the XP to be given more preference.
In short can we change the priority dynamically in Multiple Lookup Logic?
Please advise...
I have developed this code after a long time as I have always admired the way the gurus have helped me ..
I am really thankful to DaddyLOnglegs,DonketOte,Vane,Shg etc and many more from whom I have got to learn so much..
G'day
Does this help ? See attachment
Have I made you happy ??? If yes, please make me happy by pressing the Reputation icon in my post.
Please don't forget to do the same to other contributors of this forum.
Thanks
I don't void confusion, I create it
Dear RatCat,
Yes it does but can u also explain how it works?
Just by Concatenating 11&" "&@ Hours.. Amazing Stuff..
As I also thought of one more thing after I treid my own code as you must have seen the same.
I wanted to give more preference to XP Earned over SandDollars and also maybe keep it floating of possible to intechange between the two
i.e. XP or Sand Dollars so the code should act differently in case of a TIE or if the XP Earned is less and the Profit is More .
I shall try can dome back with the same.
Thanks a lot..
I've done that to match the unique words in 'FarmVille Crops' Col O. Btw it was late at night and with further testing of that formula worked out is not for you.
(For me anyway) Instead of making a long Sumproduct that I and/or we are going to get lost in I decided to breakdown the information into separate sheets.
Then in Col N on each time sheet you can adjust the higher ranking to your choice out of 4 variants. Eg your number one choice in ranking will be multiple by 1000 then the second ranking will be multiple by 100 etc etc.
Have I made you happy ??? If yes, please make me happy by pressing the Reputation icon in my post.
Please don't forget to do the same to other contributors of this forum.
Thanks
I don't void confusion, I create it
Dear RaTCat,
I will take a while before I get the complete logic absorbed..
I shall come back after that but I must say you really have taken a lot of efforts ( really appreciate that !)
DID u also get the new requirement of keeping the preference of XP over Sand Dollars Dynamic?
I am trying real hard but not able to come up with a good logic yet!
Thanks a lot...
Wow,
It worked very well RatCat, must say that this approach is much more simpler than sumproduct howeer it adds to the number of Sheets which is cause of concern as this is more to do with a game.
And I would also like to know whether the Preferences cans be changed dynamically?
G'day
I changed a few things for your 'dynamic preferences' tho unsure of what layout result your looking for but there is an example attached.
There is a drop down box (Data Validation) at the Harvesting Time. So just select the time for what your looking.
Cheers
RC
Have I made you happy ??? If yes, please make me happy by pressing the Reputation icon in my post.
Please don't forget to do the same to other contributors of this forum.
Thanks
I don't void confusion, I create it
Wow this is great,,
More compact and reobust but what I was talking about was a little complex..
See now in the same example if i want to give the preference to XP so Incase if there's a crop which has more XP abut less Sand Dollars than the second best should be selected as depending on the situation you want to move to the next level in the game whereas if you neeed to buy something you would need more Sand Dollars.
I think your codes excellent and it works brilliantly so no more requirement..Thanks alot again God Bless..!
Thank you for the blessing.
I like to ask if you, please bless the thread as solved. If you can not bless the thread please PM a Mod to solve the thread for you.
Cheers
RC
Have I made you happy ??? If yes, please make me happy by pressing the Reputation icon in my post.
Please don't forget to do the same to other contributors of this forum.
Thanks
I don't void confusion, I create it
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks