Hi everyone, I require a vba code where if in workbook "Summary", sheet "Report" column "E" = orange, apple and cherry then take the sum total from "F" and input that total into another workbook "Report", sheet "Total" in column "E7".
Thanks
Hi everyone, I require a vba code where if in workbook "Summary", sheet "Report" column "E" = orange, apple and cherry then take the sum total from "F" and input that total into another workbook "Report", sheet "Total" in column "E7".
Thanks
Biznez,
Hi again. Which book would the code reside in? Also you are saying that for all used range of column E, if E has "orange", or "apple" or "cherry" then add the F value to a total, and that total is then put in "Report"?
Please help by:
Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know
There are 10 kinds of people in this world... those who understand binary, and those who don't.
Not too fancy, but will do the trick:Please Login or Register to view this content.
How can this code work if i have additional data in column E in workbook Summary and instead of putting the total in E7, it puts it in E8?
for example, also looks for "Cat, dog, lion" and puts that total in E8?
Sorry... so for other word matches you need a separate total?
Please Login or Register to view this content.
Last edited by Arkadi; 05-01-2015 at 03:03 PM.
Getting error 'Run-time error '9' Subscript out of range on the red line below
Please Login or Register to view this content.
is summary.xlsx open? and is it called xlsx or xlsm?
its open and on the header it says "Summary [Compatibility Mode]. Its not saved anywhere as i extracted it from an external application.
ok now i saved it as xlsx and it still getting that same error message
I'm not sure how exactly you reference it, try just "Summary" without extension, or go into vba editor make a module in the Summary workbook, and make a sub with one line:It should return the name of the book as it is in that condition.Please Login or Register to view this content.
And is it still open?
yes its open
nows im getting
Run-time error '1004': Method 'Range' of object '_worksheet' failed
Please Login or Register to view this content.
Ok, how did you get past the first error?
As for the new error... does the sheet "Report" exist in the "Summary" workbook? and does it have data?
What part are you trying to simplify? Is it that you are getting errors on and off, or having trouble adapting it, or something else? Just trying to understand what your concern is so I can do my best to help accordingly
you said before that summary is a workbook extracted from an external application... is it still that way, or is it a saved book at this point?
Can you upload the report workbook, and if summary is a saved one now, maybe also that one?
In addition. When the summary file is extracted, it opens new excel application. A whole new workbook. Maybe thats the issue. This code does not connect with the other new excel. Perhaps?
Yep that could be... that is a pretty relevant detail I suppose, I'll do a few tests when I can and get back to you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks