• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Validate if a value is already in a column from another sheet

Resolved: Validate if a value is already in a column from another sheet

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

Hi ive tried to create a code so the user from cant insert the same id in the table, so ive created an insert button that validates it before he actually inserts something , but for some reason it isnt working, please help me(im new to VBA):
Heres my code:
For some reason its not looping its only validating if the value found in the first row of the table from the other sheet(Data), which is the row 6. Both cell from sheet1 and the column from Data are converted to Numbers Format(exactly the same).
Heres the Id the user insert which im trying to validate ID being I17 cell(sheet name being Form): enter image description here
Ps: if u need more info let me know
And here is the field im trying to lookin if the value matchs(Data Sheet):
enter image description here

Answer:

Because I do not know exactly what you are trying to do, this is the simplest way to get you started.
I’m guessing this will work, however this is a very bad way to look for a value, instead you could use Data.Columns("A:A").Find(What:=Sheet1.Cells(17,9).Value) and you dont have to loop a thing, I recommend doing a little reading/google searching on that approach before trying it that way.

If you have better answer, please add a comment about this, thank you!

excel vba
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Modify entity using Action in C#

24/03/2023

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Resolved: Passing 2 functions in onChange in react

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.