Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data check
Hi! I would like to check, to see if the text in column "a" in this cod exists in the range "data1" before proceeding on with the code. Thi loop may involve several dozen rows only 3 or 4 of which will have dat in column "k" but I want to verify that there is a valid name in colum "a" of that row before copying the data to another range. <start code Sheets("sheet1").Select For i = 1 To Cells(Rows.Count, "k").End(xlUp).Row If Cells(i, "k").Value < "" Then Cells(i, "n").Value = Cells(i, "a").Value Cells(i, "o").Value = Cells(i, "b").Value Cells(i, "p").Value = Cells(i, "c").Value End If Next i <end code Hope someone can help stear me in the right direction!! Thanks for your time! -- Brian Matlac ----------------------------------------------------------------------- Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350 View this thread: http://www.excelforum.com/showthread.php?threadid=56121 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data check
Sheets("sheet1").Select
For i = 1 To Cells(Rows.Count, "k").End(xlUp).Row If Cells(i, "k").Value < "" and application.Countif( _ Range("Data1"),Cells(i,"A")) 0 Then Cells(i, "n").Value = Cells(i, "a").Value Cells(i, "o").Value = Cells(i, "b").Value Cells(i, "p").Value = Cells(i, "c").Value End If Next i -- Regards, Tom Ogilvy "Brian Matlack" wrote: Hi! I would like to check, to see if the text in column "a" in this code exists in the range "data1" before proceeding on with the code. This loop may involve several dozen rows only 3 or 4 of which will have data in column "k" but I want to verify that there is a valid name in column "a" of that row before copying the data to another range. <start code Sheets("sheet1").Select For i = 1 To Cells(Rows.Count, "k").End(xlUp).Row If Cells(i, "k").Value < "" Then Cells(i, "n").Value = Cells(i, "a").Value Cells(i, "o").Value = Cells(i, "b").Value Cells(i, "p").Value = Cells(i, "c").Value End If Next i <end code Hope someone can help stear me in the right direction!! Thanks for your time!! -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=561213 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data check
Very Cool Tom!!! Thanks alot!!! -- Brian Matlac ----------------------------------------------------------------------- Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350 View this thread: http://www.excelforum.com/showthread.php?threadid=56121 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to do a data check - not sure the best way. | Excel Worksheet Functions | |||
How can I check/verify data in my Data Source for Pivot table? | Excel Worksheet Functions | |||
How can I check if data in an external data range is changed afte. | Excel Worksheet Functions | |||
How can I check if data in external data range is changed after re | Excel Discussion (Misc queries) | |||
data check | Excel Programming |