Hi Aidan, Can you please answer this? I want to check the value of a cell "two columns to the left from the cell I selected". I will select a cell anywhere in column C (c1 to c1000) and would like to check a certain value in the corresponsing cell in column A. Example: If I select cell C500 I want to run a macro if the value in cell A500 is "Environment"

Thank you!

I would do this using the change or selectionChange event of the workbook - an example is shown here for selectionchange

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 And Target.Row <= 1000 And Cells(Target.Row, 1).Value = "Environment" Then
   'do the action here
End If
End Sub

it would work much the same way for a change event - just depends when you want the macro to run.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Aidan Heritage


I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!


My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2016 About.com. All rights reserved.