Question: I am trying to make a macro for creating a pivot table. I need the Macro to select all of the data on the sheet; a friend of mine has helped me create the code above, however the macro only selects the first two columns of data instead of all 48 columns. Does anyone see any mistake we may have made? Any response would be greatly appreciated! There will always be 48 columns however there number of rows will vary from week to week. 

```
Dim lastRow As Long
Dim lastCol As Long

lastRow = 1
lastCol = 1

    While Sheets("Sheet1").Cells(lastRow, lastCol).Value <> ""
        lastCol = lastCol + 1
    Wend

lastCol = lastCol - 1

    While Sheets("Sheet1").Cells(lastRow, 1).Value <> ""
        lastRow = lastRow + 1
    Wend

lastRow = lastRow - 1

ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
    "Sheet1!R1C1:R" & lastRow & "C" & lastCol, Version:=xlPivotTableVersion12).CreatePivotTable _
    TableDestination:="", TableName:="PivotTable1", DefaultVersion:= _
    xlPivotTableVersion12

ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)

```

Answer: 
A simple way is to just check in the handler to see whether it's the chosen language.

```
var chosen_language = 'English'; // This can be updated by some other code

$("#English, #Spanish, #German").click(function() {
    if (this.id != chosen_language) {
        blah blah blah;
    }
});

```
You could pass who was selected to a variable and then use it as a filter to the main target:

```
var filter = $('#english');
$('#german, #english, #spanish').not(filter).on('click',function(){ //...

```

Also, avoid using `.click()`, use `.on()` instead (if you are not using older jQuery versions).

[FIDDLE](http://jsfiddle.net/3V4k2/)