Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AND AND is offline
external usenet poster
 
Posts: 22
Default msgbox on each value..

hello,
I have this kind of data(num):
A B C D
1 AKDTA AKTIM AKAVZ
2 Paul 10 12 16
3 Maggie 4 1 16
4 Debora 87 112 21
5 Sarah 98 6 2
6 Andrew 515 58 21
7
8
9
10
11 AKDTA AKTIM AKAVZ
12 Paul 10 12 16
13 Maggie 4 1 16
14 Debora 87 114 21
15 Sarah 98 6 2
16 Andrew 515 58 65


I need a VBA scrip to get a MSGBOX for each different value from its
correspondent, when I click a button.
ES:
c4-c12 DEBORA has worked 2 hours more than she wrote at AKTIM.
d6-d14 ANDREW has worked 44 hours more than she wrote at AKAVZ

can you help me please?
thanks a lot !!


--
BBB
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default msgbox on each value..

Not sure why you're after that particular method, but based on your
layout, an easy alternative way to see discrepancies would be to:

- Select B12:D16, with cell B12 the active cell
- Choose Format/Conditional Formatting, and enter:

CF1: Cell Value is not equal to =B2
Format1: <pattern/<red

- Click OK

Any discrepant cells will then be highlighted in red.



In article ,
AND wrote:

hello,
I have this kind of data(num):
A B C D
1 AKDTA AKTIM AKAVZ
2 Paul 10 12 16
3 Maggie 4 1 16
4 Debora 87 112 21
5 Sarah 98 6 2
6 Andrew 515 58 21
7
8
9
10
11 AKDTA AKTIM AKAVZ
12 Paul 10 12 16
13 Maggie 4 1 16
14 Debora 87 114 21
15 Sarah 98 6 2
16 Andrew 515 58 65


I need a VBA scrip to get a MSGBOX for each different value from its
correspondent, when I click a button.
ES:
c4-c12 DEBORA has worked 2 hours more than she wrote at AKTIM.
d6-d14 ANDREW has worked 44 hours more than she wrote at AKAVZ

can you help me please?
thanks a lot !!

  #3   Report Post  
Posted to microsoft.public.excel.programming
AND AND is offline
external usenet poster
 
Posts: 22
Default msgbox on each value..

Yes, I think it's a very good method, but my chief asked to me to find right
that kind of solution for our question: a popup for each discrepancie.
Thank a lot for your help, but i'm looking for a solution yet.
--
BBB


"JE McGimpsey" wrote:

Not sure why you're after that particular method, but based on your
layout, an easy alternative way to see discrepancies would be to:

- Select B12:D16, with cell B12 the active cell
- Choose Format/Conditional Formatting, and enter:

CF1: Cell Value is not equal to =B2
Format1: <pattern/<red

- Click OK

Any discrepant cells will then be highlighted in red.



In article ,
AND wrote:

hello,
I have this kind of data(num):
A B C D
1 AKDTA AKTIM AKAVZ
2 Paul 10 12 16
3 Maggie 4 1 16
4 Debora 87 112 21
5 Sarah 98 6 2
6 Andrew 515 58 21
7
8
9
10
11 AKDTA AKTIM AKAVZ
12 Paul 10 12 16
13 Maggie 4 1 16
14 Debora 87 114 21
15 Sarah 98 6 2
16 Andrew 515 58 65


I need a VBA scrip to get a MSGBOX for each different value from its
correspondent, when I click a button.
ES:
c4-c12 DEBORA has worked 2 hours more than she wrote at AKTIM.
d6-d14 ANDREW has worked 44 hours more than she wrote at AKAVZ

can you help me please?
thanks a lot !!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default msgbox on each value..

This will do what you're asking for, but it lacks any flexibility.

Public Sub CompareData():
Dim rCell As Range
Dim nDiff As Long
With ActiveSheet.Range("B2:D6")
For Each rCell In .Cells
With rCell
nDiff = .Value - .Offset(10, 0).Value
If nDiff < 0 Then _
MsgBox LCase(.Address(False, False)) & "-" & _
LCase(.Offset(10, 0).Address(False, False)) & " " & _
UCase(.Parent.Cells(.Row, 1).Text) & _
" has worked " & Format(Abs(nDiff), "0 hours ") & _
Choose(Sgn(nDiff) + 2, "more ", , "less ") & _
"than she wrote at " & _
.Parent.Cells(1, .Column) & "."
End With
Next rCell
End With
End Sub

I'll leave the potential gender confusion to you...


In article ,
AND wrote:

Yes, I think it's a very good method, but my chief asked to me to find right
that kind of solution for our question: a popup for each discrepancie.
Thank a lot for your help, but i'm looking for a solution yet.
--
BBB


"JE McGimpsey" wrote:

Not sure why you're after that particular method, but based on your
layout, an easy alternative way to see discrepancies would be to:

- Select B12:D16, with cell B12 the active cell
- Choose Format/Conditional Formatting, and enter:

CF1: Cell Value is not equal to =B2
Format1: <pattern/<red

- Click OK

Any discrepant cells will then be highlighted in red.



In article ,
AND wrote:

hello,
I have this kind of data(num):
A B C D
1 AKDTA AKTIM AKAVZ
2 Paul 10 12 16
3 Maggie 4 1 16
4 Debora 87 112 21
5 Sarah 98 6 2
6 Andrew 515 58 21
7
8
9
10
11 AKDTA AKTIM AKAVZ
12 Paul 10 12 16
13 Maggie 4 1 16
14 Debora 87 114 21
15 Sarah 98 6 2
16 Andrew 515 58 65


I need a VBA scrip to get a MSGBOX for each different value from its
correspondent, when I click a button.
ES:
c4-c12 DEBORA has worked 2 hours more than she wrote at AKTIM.
d6-d14 ANDREW has worked 44 hours more than she wrote at AKAVZ

can you help me please?
thanks a lot !!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MsgBox help James C. Excel Programming 2 March 18th 08 09:23 PM
Msgbox not ok A. Karatas Excel Programming 4 April 6th 07 07:50 AM
Msgbox help JonoB Excel Programming 2 October 27th 03 03:06 PM
Msgbox Bernd[_2_] Excel Programming 0 October 24th 03 10:20 AM
MsgBox redmad Excel Programming 1 August 1st 03 12:18 AM


All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"