tv9_rohith
Board Regular
- Joined
- Sep 1, 2011
- Messages
- 96
Code:
Dim count2 As Long
Dim counta As Long
counta=1
count = Sheets("Sheet1").Range("A2").CurrentRegion.Rows.count
count2 = Sheets("Sheet2").Range("A2").CurrentRegion.Rows.count
Do Until counta = count
count2 = count2 + counta
Sheets("Sheet2").Range("A" & count2).Value = Sheets("Sheet1").Range("A" & counta).Value
counta = counta + 1
Loop
End Sub
Code:
The above mentoined code is written to mirror the same column values between 2 sheets. ( I.e., Sheet 1 -Column A values in Sheet 2 - Column A after clicking the command button ).
It can be done in a simpler way - Using formula instead of VBA.
Code:
Code:
coping it down as far as necessary until I have all the rows .
But only the thing why I need the VBA formula is
- I have some Mandatory checks in sheet 1, only if the particular cell value is True then the command button should be enabled and the Mirroring formula should execute and if the required cell value is false then Command button will be disabled so that the mirror doesnt proceed.
Hope some one can help me.