+ Reply to Thread
Results 1 to 17 of 17

When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be OR

  1. #1
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be OR

    Dear Folks,

    I am working on huge amounts of data, where i have to find out incorrect condition in between records.

    Col-a Col-b Col-c Col-d Col-e Col-f
    AUTH_ASSISTANT SAP_R3_LG S_USER_AGR ACTVT 01 AND
    AUTH_ASSISTANT SAP_R3_LG S_USER_AGR ACTVT 02 AND

    Conditon :
    When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be OR condition

    but in my huge data set this condition went wrong and values are filled with AND. Now i need to find/mark records which have AND value in Cpl-f when record met with condition above. I am not able to do this in pivot or any vlookups, concat etc..

    See attached sample data.

    Any ideas to how to deal with this.

    Regards,
    Jay
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    If they are not equal, what should be the entry?

    Should the data be sorted or is it already sorted?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Data is sorted.
    if condition = AND even though value from Col-1 to 6 Column- k should be updated with not ok.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    What do you mean by this
    if condition = AND even though value from Col-1 to 6 Column- k should be updated with not ok.

  5. #5
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    sorry to create confusion.
    If they are not equal, what should be the entry? it should be OR.

    right now in my data set it is set to AND.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    You mentioned this in post 1 -
    When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be OR condition
    That means for 2 rows, if columns A to D are equal, it should be OR.

    What if they are not equal?

  7. #7
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    It is AND condition.
    See sample 2 file
    Attached Files Attached Files

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    This is what i have understood that needs to be done and i have put in my calculations in the last 2 columns. Please check and let me know if i am right or else correct it.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Correct interpretation.
    End record in range should be OR always.

  10. #10
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    is there anyone to help on this problem.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Try this code - for the purpose of testing, i have given the output in column M. You can either change that in the code or you can check if the macro is giving right output and then just replace the contents in I with M's contents.

    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button

  12. #12
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Thanks for stepping up.

    I tried given code. It isn't work as expected.
    See file , samplefile-2.
    Attached Files Attached Files

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    You want columns A to D to be checked right?

    What should be the output? - OR and AND or should it be OK and NOT OK?

  14. #14
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Col-B to Col-F should be checked.
    And / OR values coming from system. Any my aim is to check whether they have right condition maintained or not.

    That is why i want OK in col-m when condition maintained correctly. if not it is Not Ok.

    Seems that we are close.

  15. #15
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Try this
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    08-29-2010
    Location
    eindhoven
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    Dear Arlette,

    Thanks. I have tried it on the same day.
    It doesn't work. Appreciated your support in this.

    May I know your email ID?

    Regards,
    Jay

  17. #17
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: When values in row 1 and row are equal from Col-a to Col-d are equal Col-F should be O

    When you say, its not working? Are you getting any error or wrong results?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1