+ Reply to Thread
Results 1 to 6 of 6

This ones tricky

Hybrid View

test1986 This ones tricky 12-04-2006, 09:37 AM
Carim Hi, With an array formula... 12-04-2006, 09:42 AM
test1986 Carim, I apreciate the... 12-04-2006, 09:47 AM
Carim Sorry ... read too quickly... 12-04-2006, 09:51 AM
test1986 Yup, Thats the kind of thing... 12-04-2006, 09:58 AM
Carim You are welcome ... Thanks... 12-04-2006, 10:00 AM
  1. #1
    Registered User
    Join Date
    09-20-2006
    Posts
    47

    This ones tricky

    Hi all,

    Sorry about this.

    I want a piece of code to set up an alarm to tell me when there is a differentiation in some of the codes.

    So i want it to look down column A which will look at the code and see if there is any other cells with this same code in column A. If there is i then want it to check the cell next to it in column B and see if there is a differentiation witht the prices. So if cell A56 has a code of 566.876 in column A and so does cell A108, but they both have different prices in column B then i want an alarm to pop up and let me know or highlight the cells.

    Hope this makes sense. Please let me know if it doesnt.

    Cheers

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    With an array formula (Control Shift Enter ) in cell D1 :

    =IF(COUNTIF($A$1:$A$200,B1)=0,B1,"")
    and copy down ...

    HTH
    Carim

  3. #3
    Registered User
    Join Date
    09-20-2006
    Posts
    47
    Carim,

    I apreciate the help but im not sure it does what i want it to. I want the macro to show me an Alarm if there is any row with the same number in column A but a different on in B.

    Is there a way to do this.

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Sorry ... read too quickly ...

    'Windows API function declaration
    Private Declare Function PlaySound Lib "winmm.dll" _
      Alias "PlaySoundA" (ByVal lpszName As String, _
      ByVal hModule As Long, ByVal dwFlags As Long) As Long
    
    Function Alarm(Cell, Condition)
        Dim WAVFile As String
        Const SND_ASYNC = &H1
        Const SND_FILENAME = &H20000
        On Error GoTo ErrHandler
        If Evaluate(Cell.Value & Condition) Then
            WAVFile = "C:\winnt\media\notify.wav"
            Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
            Alarm = True
            Exit Function
        End If
    ErrHandler:
        Alarm = False
    End Function
    HTH
    Carim

  5. #5
    Registered User
    Join Date
    09-20-2006
    Posts
    47
    Yup, Thats the kind of thing i need, Thanks Carim, youve been a real help.

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    You are welcome ...

    Thanks for the feedback

    Carim

+ 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