Detect Enter Key and search value in a range

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
387
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
Hi friends.

How to do:

the user start capture in cell A1="APPLE" go to A2 and capture "ORANGE" and then the user capture in A3="APPLE" here how to check every capture if exist say a message: "Error, captured on A1"


or only can do the task, with a button and with vba code?


thanks
 
Sorry, I'm struggling to understand that - language translation problem? Perhaps you could try again & try to be more more careful with the English if you can.


ok i try

First Thanks for explanation...
Second: i have this macro:



Code:
Sub Promedios(value as String)
Dim suma As Double
Dim promedio As Double
Dim n As Double
Dim celda As Range

    suma = 0 'acumula los valores
    n = 0    'cuenta los valores
    
    For Each celda In Selection
        n = n + 1
        suma = suma + celda.Value
    Next celda
    
    promedio = suma / n
    MsgBox "Valores leÃ*dos = " & n & vbCrLf & _
           "Suma = " & suma & vbCrLf & _
           "Promedio = " & promedio
End Sub


how to call from Data verification?

Thanks
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
how to call from Data verification?
Data Validation itself cannot call a macro. You could try a Worksheet_Change event that monitors the DV cell(s) and if those cells are changed call the macro.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,210
Members
453,023
Latest member
alabaz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top