ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help whith Data parser (https://www.excelbanter.com/excel-programming/425246-help-whith-data-parser.html)

Tomkat743

Help whith Data parser
 
what i am trying to do is have a formula or macro that can look in cell u4
then cell v4 then cell w4 and so on, if the cell contains a 1, 2 or -1
report the data in cell v1 to cell n4.

Each row has data from u to cs with about 500 rows of data. I have to parse
each row looking for a 1 or -1 or sometimes even a 2 or -2 then report the
value of the header row to one of 6 blank column rows n to s. There is a
maximum of 6 codes allowed per row hence the 6 blank column rows to show
data. I am trying to parse a spreadsheet designed by someone else so changing
the original layout is not an option.

Thank you in advance for any help on this.


Bernie Deitrick

Help whith Data parser
 
Tonkat,

In cell N4, this looks for any occurence of 1 or 2....

=IF(OR(COUNTIF(U4:Z4,"*1*")0,COUNTIF(U4:Z4,"*2*") 0),V1,"Not Found")

Though I have my doubts as to your problem statement.

HTH,
Bernie
MS Excel MVP


"Tomkat743" wrote in message
...
what i am trying to do is have a formula or macro that can look in cell u4
then cell v4 then cell w4 and so on, if the cell contains a 1, 2 or -1
report the data in cell v1 to cell n4.

Each row has data from u to cs with about 500 rows of data. I have to parse
each row looking for a 1 or -1 or sometimes even a 2 or -2 then report the
value of the header row to one of 6 blank column rows n to s. There is a
maximum of 6 codes allowed per row hence the 6 blank column rows to show
data. I am trying to parse a spreadsheet designed by someone else so changing
the original layout is not an option.

Thank you in advance for any help on this.




Tomkat743

Help whith Data parser
 

Thank you but that formula only looks for one instance in a row the row may
have up to 6 cells that contain either a 1 or a 2. Each time a number 1 or 2
is encountered i need it to report v1.
"Bernie Deitrick" wrote:

Tonkat,

In cell N4, this looks for any occurence of 1 or 2....

=IF(OR(COUNTIF(U4:Z4,"*1*")0,COUNTIF(U4:Z4,"*2*") 0),V1,"Not Found")

Though I have my doubts as to your problem statement.

HTH,
Bernie
MS Excel MVP


"Tomkat743" wrote in message
...
what i am trying to do is have a formula or macro that can look in cell u4
then cell v4 then cell w4 and so on, if the cell contains a 1, 2 or -1
report the data in cell v1 to cell n4.

Each row has data from u to cs with about 500 rows of data. I have to parse
each row looking for a 1 or -1 or sometimes even a 2 or -2 then report the
value of the header row to one of 6 blank column rows n to s. There is a
maximum of 6 codes allowed per row hence the 6 blank column rows to show
data. I am trying to parse a spreadsheet designed by someone else so changing
the original layout is not an option.

Thank you in advance for any help on this.





Bernie Deitrick

Help whith Data parser
 
The formula looks at all six, and reports whether a 1 or 2 is found. Not
sure what you mean by "Each time" - do you have six different cells where
you want the formula?

Bernie

"Tomkat743" wrote in message
...

Thank you but that formula only looks for one instance in a row the row
may
have up to 6 cells that contain either a 1 or a 2. Each time a number 1
or 2
is encountered i need it to report v1.
"Bernie Deitrick" wrote:

Tonkat,

In cell N4, this looks for any occurence of 1 or 2....

=IF(OR(COUNTIF(U4:Z4,"*1*")0,COUNTIF(U4:Z4,"*2*") 0),V1,"Not Found")

Though I have my doubts as to your problem statement.

HTH,
Bernie
MS Excel MVP


"Tomkat743" wrote in message
...
what i am trying to do is have a formula or macro that can look in cell
u4
then cell v4 then cell w4 and so on, if the cell contains a 1, 2 or -1
report the data in cell v1 to cell n4.

Each row has data from u to cs with about 500 rows of data. I have to
parse
each row looking for a 1 or -1 or sometimes even a 2 or -2 then report
the
value of the header row to one of 6 blank column rows n to s. There is
a
maximum of 6 codes allowed per row hence the 6 blank column rows to
show
data. I am trying to parse a spreadsheet designed by someone else so
changing
the original layout is not an option.

Thank you in advance for any help on this.







All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com