Transferring data between sheets using macros

Closed
Scotteh - Sep 4, 2015 at 05:13 PM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Sep 5, 2015 at 07:29 AM
Hello,

I am having difficulty getting this to work. My original intention was to use a For Loop with an If check, but here is what I am trying to do.

I have a pre-made spreadsheet meant to sort my employees into "departments" evenly. That works ok, but the nature of the sheet gives the Output in a difficult to read format (lots of spaces and '0' values), but shows all 4 departments on one sheet.

What I thought I would do is create a tab for each department, and use a command button to basically pull all the info from the Output tab into the current tab. I want to use an If check so that if there is not a string value in the cell, it will skip that one and on the next line of the "final output", let's call it, it basically skips all the blanks and gives the names in a nice neat format.

I am looking to output across 4 columns, and then down varying rows (up to 51 in the longest column).

My question, I guess, is what is the proper way to reference a worksheet.

I was using Cells(Output!x, A) but got an error.
I then tried setting a variable as a Worksheet, and naming it "Output", and using Cells(var.x, A)

Any help would be greatly appreciated! Thanks in advance!

Related:

1 response

vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 262
Sep 5, 2015 at 07:29 AM
Hello Scotteh,

So that we can fully understand what you would like to do, could you please upload a sample of your work book (be careful with any sensitive data) showing inputs and the expected results.

You can upload a sample using a free file sharing site such as DropBox, ge.tt or SpeedyShare.

Someone should then be able to help you.

Cheerio,
vcoolio.
0