Click here to Skip to main content
15,928,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Currency Validation Pin
Dave Kreskowiak29-Jun-04 3:20
mveDave Kreskowiak29-Jun-04 3:20 
GeneralBinary Serialization Issue Pin
tmfish28-Jun-04 9:16
tmfish28-Jun-04 9:16 
QuestionSetup Project for 2 0r 3 solutions? Pin
mythinky27-Jun-04 18:02
mythinky27-Jun-04 18:02 
AnswerRe: Setup Project for 2 0r 3 solutions? [EDITED] Pin
Dave Kreskowiak28-Jun-04 0:46
mveDave Kreskowiak28-Jun-04 0:46 
Generaltab command Pin
GaryKoh27-Jun-04 16:46
GaryKoh27-Jun-04 16:46 
GeneralRe: tab command Pin
bneacetp27-Jun-04 18:33
bneacetp27-Jun-04 18:33 
GeneralRe: tab command Pin
GaryKoh28-Jun-04 3:07
GaryKoh28-Jun-04 3:07 
GeneralRe: tab command Pin
Dave Kreskowiak28-Jun-04 3:30
mveDave Kreskowiak28-Jun-04 3:30 
QuestionSelect Expert in CrystalReportViewer? Pin
mythinky27-Jun-04 15:31
mythinky27-Jun-04 15:31 
AnswerRe: Select Expert in CrystalReportViewer? Pin
Dave Kreskowiak28-Jun-04 3:17
mveDave Kreskowiak28-Jun-04 3:17 
GeneralRe: Select Expert in CrystalReportViewer? Pin
mythinky28-Jun-04 15:34
mythinky28-Jun-04 15:34 
GeneralRe: Select Expert in CrystalReportViewer? Pin
Dave Kreskowiak28-Jun-04 15:39
mveDave Kreskowiak28-Jun-04 15:39 
GeneralManually disposing objects with API Pin
Name Removed27-Jun-04 13:45
Name Removed27-Jun-04 13:45 
GeneralRe: Manually disposing objects with API Pin
Dave Kreskowiak27-Jun-04 14:31
mveDave Kreskowiak27-Jun-04 14:31 
GeneralRe: Manually disposing objects with API Pin
Name Removed27-Jun-04 15:36
Name Removed27-Jun-04 15:36 
GeneralRe: Manually disposing objects with API Pin
Dave Kreskowiak27-Jun-04 18:18
mveDave Kreskowiak27-Jun-04 18:18 
GeneralConverting C# code to VB.NET code... Pin
milkmood27-Jun-04 12:54
milkmood27-Jun-04 12:54 
GeneralRe: Converting C# code to VB.NET code... Pin
milkmood27-Jun-04 13:26
milkmood27-Jun-04 13:26 
GeneralRe: Converting C# code to VB.NET code... Pin
Christian Graus27-Jun-04 13:35
protectorChristian Graus27-Jun-04 13:35 
Generalmouse action Pin
ahmad_yossef27-Jun-04 10:57
ahmad_yossef27-Jun-04 10:57 
GeneralRe: mouse action Pin
Dave Kreskowiak28-Jun-04 2:57
mveDave Kreskowiak28-Jun-04 2:57 
GeneralComparison in Excel Pin
jbreen727-Jun-04 10:11
jbreen727-Jun-04 10:11 
Hello All,

I need to compare cells in excel to determine if a combination of three numbers appears within another combination of five numbers (each number is in its seperate cell). I think the code that I have written is partially working, however I am having a problem storing the values of my counter.
For example lets say that these are my 5 number combos:
1 2 3 4 5
1 3 5 7 8
And these are my 3 number combos
1 2 3
2 4 5
1 3 5

Based on the above, 1 2 3 appears once, 2 4 5 appears once and 1 3 5 appears twice. In reality I will be comparing a large number of 3 number combinations compared to the 5 number combos. So far this is the code that I have. j is the row for 3 combos and r is the row for the 5 combos. f is the final value that I will get from my flags:

For j = 2 To 60
Set curCell_7 = Worksheets("Combinations").Cells(j, 9)
Set curCell_8 = Worksheets("Combinations").Cells(j, 10)
Set curCell_9 = Worksheets("Combinations").Cells(j, 11)
For r = 2 To 15
Set curCell_2 = Worksheets("Combinations").Cells(r, 2)
Set curCell_3 = Worksheets("Combinations").Cells(r, 3)
Set curCell_4 = Worksheets("Combinations").Cells(r, 4)
Set curCell_5 = Worksheets("Combinations").Cells(r, 5)
Set curCell_6 = Worksheets("Combinations").Cells(r, 6)
If curCell_7.Value = curCell_2.Value Then
a = 1
ElseIf curCell_7.Value = curCell_3.Value Then
b = 1
ElseIf curCell_7.Value = curCell_4.Value Then
c = 1
ElseIf curCell_7.Value = curCell_5.Value Then
d = 1
ElseIf curCell_7.Value = curCell_6.Value Then
e = 1
End If
' If f equals to 1 then store f to final sum
f = (a + b + c + d + e) / 3
Worksheets("Combinations").Cells(j, 12) = f
Next r
Next j

The problem I am having is storing the value of f. I am sure that this is a simple one but I do not typically code in VB so I am a little unsure of how to store this value and could not determine it from what I read on the internet. Can anyone help me with this? Thanks.

John Breen
GeneralRe: Comparison in Excel Pin
Dave Kreskowiak28-Jun-04 3:01
mveDave Kreskowiak28-Jun-04 3:01 
Generaldisbale any pop up menu Pin
?!?27-Jun-04 6:38
?!?27-Jun-04 6:38 
GeneralRe: disbale any pop up menu Pin
Dave Kreskowiak27-Jun-04 14:25
mveDave Kreskowiak27-Jun-04 14:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.