copy the entire row when a cell in a column matches a cell column

gvgbabu

Member
Joined
Sep 22, 2013
Messages
11
Programming Experience
Beginner
Hi

i am very new to vb.net/vb 2010
How to copy the entire row when a cell in a column matches a cell in another column. copy all the rows untill there is now matches.

please see the attachment and guide me


thanks
gvg
 

Attachments

  • example.zip
    9.5 KB · Views: 27
Personally, I won't download, extract, open, and examine someone else's project except as a last resort. If you just provide a full and clear explanation in your post and include just the relevant code then we can see everything we need without going anywhere or doing anything extra. Sure, it can be a little bit more effort for you but that's only fair, don't you think? Help us to help you and you'll likely get a solution to your problem. Take the easy way out and expect us to work to help you and some people at least will probably ignore your question and you miss out.
 
Today, 11:42 AM
#2
hi jmcilhinney,

thanks for your reply

i thought it would be very clear when i give example file.

Ok i will explain it

for example i have data in excel
A B C D E
No. B D START END
1 230 450 1 47
2 230 525 2 51
...............................................
..................................................
.................................... SO ON
34 230 450 47 68
...............................................
..................................................
.................................... SO ON

I Want the 2 row will be which row value matches that row comes (ie E2 cell value is 47 which row matches in D column
will be the 2nd row) if there is no matches then leave one space and ascending order in A2 cell (ie A2 cell value is 1
then next row will come which has 2 value at starting of the row).
A B C D E
No. B D START END
1 230 450 1 47
34 230 450 47 68

2 230 525 2 51
...............................................
..................................................
.................................... SO ON


i did not understand how to start.
i tried VLOOKUP, MATCH but i could not get it

please help me to get it.



 
Your question will be impossible to answer until you show us the code you are already working with. I assume the source is an Excel worksheet, how do you open and read it? Through OleDb or the Excel PIA? Through OleDb and ADO, you would just query the data source properly. Through the PIA personally I would put the data in an easier worked container like a datatable and do approximately the same, through Linq.

Again, this question is like asking "How do I fit these two pieces together?" without us knowing what the pieces are or what shape they are.

It is really important when posting on a public technical forum to properly articulate what you are asking, and take the time to make sure the language used is appropriate, otherwise you force other people to work hard at just understanding your question, and considerably reduce your odds of getting a helpful answer...
 
Back
Top