Need help with this code, it counts only the second after "And".And if it possible to do like if cell("2.3")<point
reenter
else
Range..
Is it possible to do aritmetics with cells or do smth with other operators?

Sub hugo()
Dim point As Double
InputBox ("Enter The Closing Point(Between 1.1-1.6)")
If point >= 1.1 And point < 1.6 Then
MsgBox ("Reenter point")
InputBox ("Enter The Closing Point")
Else
Range("D25").Value = InputBox("Enter The Closing Point(Between 1.1-1.6)")
End If
End Sub

In excel math between cells is handled by functions. Any regular math can easily be done, adding, subtracting, multiplying, dividing, between individual cells and/or range of cells. More complicated math can also be accomplished but the learning curve goes up lol.

strsum = Application.InputBox("Enter the sum")
If (strsum > 5000) Then
MsgBox ("Reenter sum")
strsum = Application.InputBox("Enter the sum")
Range("C5").Value = strsum
Else
Range("C5").Value = strsum

End If
End Sub

Tricky little excel.what to do if vba ignores else statement?I know this code is wrong ,but it works -until second wrong input, and "else ".Yesterday was ok, now i have to do my project from the begining...

Try this. Some of the syntax might not be 100% but you should be able to figure it out. 'strsum starts out with a value of 5000 but the while loop will trap it until it changes.

Dim strsum as string = 5000
while strsum >= 5000
strsum = Application.InputBox("Enter the sum(under 5000)")
endwhile
Range("C5").Value = strsum

Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...

When I execute this progammatically, I get a table with row heights much larger than when I do this manually.

Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table.

public void AddClipboard()
{
Sel.PasteExcelTable(false,false, false);
var t = Sel.Tables[Sel.Tables.Count];
t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent);
}

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...