If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > How to join 3 macro conditions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-24-11, 05:44
Simplify Simplify is offline
Registered User
 
Join Date: Oct 2009
Posts: 6
How to join 3 macro conditions

I need to run a macro that will, based on a cell value G6, copy and paste content of a tab and save the file in a given directory, after which it will close the master file. The saving part i have figured out, but i can not come to a good
resolution on conditions and connecting the whole thing together. I have produced terrible mess myself lol, and basically am looking for someone who can sort it out So - I am looking to have a macro that will use conditions - so if cell is A, then copy& save tab A, if its B, then B, if C then C. The master file will be closed automatically once the copy is saved.


More info:

If cell G6 in Tab 1 says "Regus",i want the macro to copy & paste tab 2 to a new sheet in a folder New Offices, naming it "Regus_Office_[today's date]"
or
If cell G6 in Tab 1 says "Small", copy & paste tab 3 to a given folder, naming it "Small_Office_[today's date]"
or
If cell G6 in Tab 1 says "Medium", copy & paste tab 4 to a folder, naming the new workbook "Medium_Office_[today's date]"

Ranges for content that the macro should pick up and paste per condition:
Tab 1 is called Start Here and has only one cell macro should be reading - G6
Tab 2 ( called REGUS) C2:F20
Tab 3 ( Small) C3:F69
Tab 4 (Medium) C3:F81

Mastersheet is called Kitlist Master.. I am using Excel 2010, but most of the users will use 2007. I can also provide a copy of the sheet, if that helps??

Can anyone help me please, pretty please?

Reply With Quote
Reply

Tags
excel macro, if conditions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On