HY , I NEED AN VBA CODE TO SHOW IN CELL A1 COUNT OF CELLS ON SELECTED ROW WITH AN MARK X…
- User
HY , I NEED AN VBA CODE TO SHOW IN CELL A1 COUNT OF CELLS ON SELECTED ROW WITH AN MARK X INSIDE FOR Sheet2(Licente)
- Assistant
To achieve your goal of counting cells with an "X" mark in the selected row of Sheet2 (named "Licente") and displaying that count in Cell A1 of the same sheet, you can use the following VBA code. This script should be placed in the worksheet module for Sheet2 in your Excel workbook:
- Open Excel and go to the sheet named "Licente."
- Press
Alt+F11to open the Visual Basic for Applications (VBA) editor.
- User
Private Sub Worksheet_SelectionChange(ByVal Target As Range) abiguus name
- Assistant
- User
Set selectedRow = Me.Rows(Target.Row)-invalid use of me keyboard
- Assistant
Apologies for any confusion caused earlier. If you are receiving an "invalid use of Me keyword" error in your VBA code, it suggests there may be a misunderstanding in the context of how should be used. The keyword is valid within the context of class modules in VBA, which includes Worksheet modules and Workbook modules, as it refers to the current instance of the class. However, if your code is mistakenly placed outside these contexts or if there is a misinterpretation of the script setup, you might encounter this issue.
- User
i allready have code there how i put another vba code in sheet licente?
- Assistant
- User
ok now i need an vba code to do this : for Sheet2(Licente) only for all cells marked with an x inside only for selected row do this: change colour of selected cells with an mark x and for the first cell form the row selected to an random colour that will be kept after deselected the row , and in cells a1 show number of cells with an mark x inside from that row , number will not be keeped after deselect the row
- Assistant