Link to home
Start Free TrialLog in
Avatar of david remichi
david remichiFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do get cells to print depending on what data in them.

I have a workbook and in the sheet called "shift sheet" I have data in cells U21- U31

What im trying to do is get a message box come up askingare you sending your coins in your 700 cash bag?  If answer id YES than I need data from cells U21-U30 copied and pasted into sheet called "CASH SHEET" in D18-D28
If answer is NO then I need data from shift sheet U21-24 copied and pasted in D18-21 in sheet called cash sheet.

Any Ideas?
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

When should the message box appear?

You say "U21-U30 [10 cells] copied and pasted into sheet called "CASH SHEET" in D18-D28 [11 cells]". Is that correct?

In both cases after answering Yes or No you have data going to the CASH SHEET. Is that correct?
Here is a workbook you can try. Click cell "B2".
29220511.xlsm
Avatar of david remichi

ASKER

Yes this is what I need. Is it in macro format as need the button else where and also add data to sheet. 
I'm not sure what you mean when you say "also add data to sheet.", but yes, it's a macro and here is a version with a button (near column V).

29220511a.xlsm
Sorry what I meant was I have to create a sheet with more data in. Can I copy and paste into my workbook the macro button 
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I’m glad I was able to help. And that you for the testimonial.

If you expand the “Full Biography" section of my profile you’ll find links to some articles I’ve written that may interest you.

Marty - Microsoft MVP 2009 to 2017
              Experts Exchange Most Valuable Expert (MVE) 2015, 2017
              Experts Exchange Distinguished Expert in Excel 2018
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2020
              Experts Exchange Top Expert VBA 2018 to 2020