Data
I have a 1000 line worksheet that I download from SAP, but the data is not
formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
Data
iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow If Left(Cells(i,"H").Value,3) = "ORD" Then Cells(i,"B").Value = Cells(i,"H").Value End If Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I have a 1000 line worksheet that I download from SAP, but the data is not formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
Data
Do I put this in a macro, if yes then what is the macro name.
Thanks, David "Bob Phillips" wrote: iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow If Left(Cells(i,"H").Value,3) = "ORD" Then Cells(i,"B").Value = Cells(i,"H").Value End If Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I have a 1000 line worksheet that I download from SAP, but the data is not formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
Data
Yes you do, and whatever you want to call it.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... Do I put this in a macro, if yes then what is the macro name. Thanks, David "Bob Phillips" wrote: iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow If Left(Cells(i,"H").Value,3) = "ORD" Then Cells(i,"B").Value = Cells(i,"H").Value End If Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I have a 1000 line worksheet that I download from SAP, but the data is not formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
Data
I need it after this value "300001846"
Thanks, David "Bob Phillips" wrote: Yes you do, and whatever you want to call it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... Do I put this in a macro, if yes then what is the macro name. Thanks, David "Bob Phillips" wrote: iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow If Left(Cells(i,"H").Value,3) = "ORD" Then Cells(i,"B").Value = Cells(i,"H").Value End If Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I have a 1000 line worksheet that I download from SAP, but the data is not formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
Data
I don't understand the comment.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I need it after this value "300001846" Thanks, David "Bob Phillips" wrote: Yes you do, and whatever you want to call it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... Do I put this in a macro, if yes then what is the macro name. Thanks, David "Bob Phillips" wrote: iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow If Left(Cells(i,"H").Value,3) = "ORD" Then Cells(i,"B").Value = Cells(i,"H").Value End If Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I have a 1000 line worksheet that I download from SAP, but the data is not formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
Data
The way the macro is it puts in below the 300* I need it on the next column.
300001846 columnA1 put the value of ORD* in B1 0 7/1/2006 100108357 7/1/2006 ORD 14000732 column H 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 Thanks for your help. "Bob Phillips" wrote: iLastRow = Cells(Rows.Count,"A").End(xlUp).Row For i = 1 To iLastRow If Left(Cells(i,"H").Value,3) = "ORD" Then Cells(i,"B").Value = Cells(i,"H").Value End If Next i -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "David" wrote in message ... I have a 1000 line worksheet that I download from SAP, but the data is not formatted correctly. I need to check if in Column H there is "ORD *" then return that value a Column B. Going through every single line will take forever. If somebody can help on this I would really appreciate it. Column A Column H 300001846 0 7/1/2006 100108357 7/1/2006 ORD 14000732 100108357 7/1/2006 ORD 14000732 300001847 0 7/1/2006 100110756 7/1/2006 ORD 14000819 100110756 7/1/2006 ORD 14000819 |
All times are GMT +1. The time now is 10:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com