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:
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 .
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 .