Monday, 15 July 2013

excel - Selecting two columns based on active cell? -


I am trying to make conditional formatting at a long distance in the group of 2. I'm not sure how a macro records which will select columns from the active cell and the column next to it, then apply the conditionalization process. Then take two cells down and repeat.

It is still with me, but it is going back to those special rooms, I need to take it to the right 2.

  sub finddups () '' FindDups macro activiv.Entier column. Select the format. Format condition.edual value selection. Format condition (selection.form condition.quant) .Setest priority selection. Format condition (1) .IPOnic = XL Dialipalase Selection. Format Conditions (1) .font .Laur = -16383844TintAndShade = 0 end with selection. Format (1). External: Parton collar index = xlAutomatic Color = 13551615 .TintAndShade = 0 End With Selection Format Conditions (1) .topIfTrue = False Range ("M1"). Select the worksheets (select "Activate user selection list", select the offset (0, 2). Choose End Sub    

You should work to get it started to avoid using select , and only ActiveCell due to macros < Em> using as a means of knowing preferably, you can do this with a application.InputBox but this is not a great deal

Because I do not know how many times you want it in the loop, I will continue through a two ... loop statement, and this column number and gt; 26. You can convert it to loop ... in the statement.

  sub findDups () dim startcell range dim format Set the range as calculations startcell = Set up ActiveCell FormatCols = startCell.Resize (1, 2). Interval format formatColors.format.edu.deudicvalues ​​formatCalay.form condition (format Format FormatConditions.Count.). RecommendedPerformanceCalls.Format Conditions (1) .DeputyNational = XLDDuplicate FormatsColors. Format Conditions (1) = -16383844TintAndShade = 0 formatCols.FormatConditionswith end (1) .Interior .PatternColorIndex = xlAutomatic .color = 13,551,615 .TintAndShade = 0 set startCell = startCell.Offset (0, 2) loop ending with startCell.Column & gt; = 26 End Sub   

Here is an example of the formatting of the output:

 Enter image details here

No comments:

Post a Comment