Copy Data From Multiple Sheets into Master Sheet if Cell Value >0

VanillaBryce

New Member
Joined
Apr 14, 2022
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Good evening all!

I have a baseball card collection I have catalogued in about 70 sheets, each sheet named for a year 1950-2020. Each card has a row with data in columns A:H. Columns A:G are identifying information for the card (i.e., Year, Brand, Set, Subset, Number, Name, Style). Column H is "Quantity" and... has a numerical value representing the quantity of that particular card I have in my collection.

I want to create a new sheet called All Owned that lists every card I own. In other words, I need some kind of formula or macro that will automatically search column H in all 70 sheets, and if the value in H is greater than 0, then it will copy and paste all information in the same row A:H.

Ideally, I would like this All Owned sheet to automatically update as I update my collection in the sheets labelled 1950-2020. Thank you!
 
Unfortunately, I can't reproduce the error you're getting at my end. Using all the code I posted, if I start (as an example) with the following on the All Owned sheet (note 1 instance of 1950 in row 2)
Vanilla Bryce.xlsb
ABCDEFGH
1YearBrandSetSubsetNumberNameStyleQuantity
219501950195019501950195019501
319511951195119511951195119511
419511951195119511951195119511
All Owned


Based on the following in my sheet2:
Vanilla Bryce.xlsb
ABCDEFGH
1YearBrandSetSubsetNumberNameStyleQuantity
219501950195019501950195019501
319501950195019501950195019500
4
Sheet2


which, when I change it to this (add 1 to cell H3)

Vanilla Bryce.xlsb
ABCDEFGH
1YearBrandSetSubsetNumberNameStyleQuantity
219501950195019501950195019501
319501950195019501950195019501
4
Sheet2


I automatically get the following in the All Owned sheet (note the additional 1950 added to row 3)

Vanilla Bryce.xlsb
ABCDEFGH
1YearBrandSetSubsetNumberNameStyleQuantity
219501950195019501950195019501
319501950195019501950195019501
419511951195119511951195119511
519511951195119511951195119511
All Owned


Try this: remove the private sub worksheet_change code from a sheet; change a 0 to 1 in that sheet; then run the Update_Sheet_Change() sub routine and see if it makes the change to the All Owed sheet that you'd expect.
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
This...?
 

Attachments

  • Screenshot 2022-04-15 220355.png
    Screenshot 2022-04-15 220355.png
    131.1 KB · Views: 5
Upvote 0
This?
 

Attachments

  • Screenshot 2022-04-15 221234.png
    Screenshot 2022-04-15 221234.png
    149.7 KB · Views: 5
  • Screenshot 2022-04-15 221305.png
    Screenshot 2022-04-15 221305.png
    40.8 KB · Views: 5
Upvote 0
Thank you. I don't see the module containing the Add_New_Year() or Update_Sheet_Change() sub routines (I'd expect to see them below the ThisWorkbook icon. Where do you have them? Also, I don't use KutoolsforExcel at all. I'm wondering if that could be causing an issue?
 
Upvote 0
I'm not sure what you mean by "Where do you have them? This is the only spot I know to view the modules- Alt F8.
 

Attachments

  • Screenshot 2022-04-15 222352.png
    Screenshot 2022-04-15 222352.png
    27.1 KB · Views: 5
Upvote 0
I'm not sure what you mean by "Where do you have them? This is the only spot I know to view the modules- Alt F8.
I see, you have them in the sheet55 code area. If you double click on Sheet55 (All Owned) in the Project Explorer in the VBA Editor, you'll see them. They really should be in a standard module (not that that will solve the issue, but is is standard practice). In the VBA Editor menu at the top of the screen select Insert, Module. Move the 2 subroutines there for a start.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top