Multiple Worksheet data input

WGRoad

New Member
Joined
Apr 9, 2011
Messages
13
Hello guys,

You've been awesome so far as for the rest of my posts, regarding some few questions I had, so I hope you can answer me this little question also :).

So, let's say I have 10 worksheets on a workbook, all similar in the "work area", which has a range "C9:Q78".

For each worksheet, in cell J4, I have its specific number, which is the number of the sheet (i.e., sheet 1 as the number 1 in cell J4 and so on).

On the work area, column J, is where we put sheet numbers.

An example of what it does now, is if in worksheet 1, on column J we input "5", then the information of that row of the J column cell will be copied onto worksheets number 2,3, and 4.

For now, what I have is, on each cell, I have an IF formula, that makes the information to be copied as I want to.

But one big problem on that, is that, if someone deletes the formulas on the worksheets by mistake, then this system doesnt work well...

Was trying to build a vba code with my little skills, but I can't seem to find the correct way to do it.

For now, I have a really simple code that goes like this:

Code:
[COLOR=#0000ff]    Dim[COLOR=#000000] a [/COLOR][COLOR=blue]As[/COLOR][COLOR=#000000] Long[/COLOR][/COLOR]
    [COLOR=#0000ff]Dim[/COLOR] ws [COLOR=blue]As[/COLOR] Worksheet 
    Application.ScreenUpdating = [COLOR=blue]False[/COLOR] 
    for a = 9 to 78
    [COLOR=blue]For Each[/COLOR] ws [COLOR=blue]In[/COLOR] ActiveWorkbook.Sheets 
      
       If ActiveSheet.Cells(a, 10).Value > ws.Cells(4, 10).Value Then
       
       ws.range(cells(a,3),cells(a,17)).value=activesheet.range(cells(a,3),cells(a,17)).value
     Next a
     [COLOR=blue]Next[/COLOR] ws 
    Application.ScreenUpdating = [COLOR=blue]True[/COLOR] 
[COLOR=blue]End Sub[/COLOR]


This code doesnt work at all... but I think it explains what I am trying to achieve...

Thanks in advance for any attention payed to this matter :).
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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