I am new to spring and trying to learn basic crud operations but I am stuck with delete operation my entity looks like following 

```
public class Alien {
@Id
int aid;
String aname;
public int getAid() {
    return aid;
}
public void setAid(int aid) {
    this.aid = aid;
}
public String getAname() {
    return aname;
}
public void setAname(String aname) {
    this.aname = aname;
}

```

My home.jsp file looks like the following

```
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<form action="addAlien">
<input type="text" name="aid"><br>
<input type="text" name="aname"><br>
<input type="submit"><br>
</form>

<form action="deleteAlien">
<input type="text" name="aid"><br>
<input type="submit"><br>
</form>
</body>
</html>

```

And controller looks like following i want submit button in delete operation where i want to delete entry bases on id

```
public class HomeController {
@Autowired
Alienrepo alienrepo;

@RequestMapping("/")
public String home() {
  return "home.jsp";
  }

@RequestMapping("/addAlien")
public String addAlien(Alien alien) {
    alienrepo.save(alien);
    return "home.jsp";

}
@RequestMapping("/deleteAlien")
public String deleteAlien(Integer id) {
    alienrepo.deleteById(id);
    return "home.jsp";
}
}

```

What is that I am missing?
['https://Stackoverflow.com/questions/61248155', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10444822/']
This `Formula1:="="""` is no valid validation forumla. The formula must according to the documentation [Validation.Add method](https://learn.microsoft.com/en-us/office/vba/api/excel.validation.add) result in `True` or `False`. 

So replace it with `Formula1:=rngP.Address(False, False) & "="""`. You somehow need an address in the formula that `""` is compared to.
cheers to @HTH re the first part of the answer. 

The final issue I had with runtime error 1004, was that I had not put in enough quotation marks.

So where I had: `RngP.Validation.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Formula1:="="""`

I should have had `RngP.Validation.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Formula1:=""=""""`