Consulting

Results 1 to 2 of 2

Thread: Data manipulation

  1. #1

    Data manipulation

    what im trying to do is i have a value stored in A which can be either a full number (like 1) or a part number (like 1.1) if the number is a full number i want to take the value stored in col E and store in in a variable. If its a part number i want to take the value previously stored in the variable and multiply by the number in coll E and then place the result in coll F.

    this is where im up to but it seems to do nothing any help will be appreciated
    Sub Button1()
    Count = 2
    Do
    If (Int(Acount) = Acount) Then
    tempvalue = Ecount
    Else
    Fcount = Ecount * tempvalue
    End If
    Count = Count + 1
    Exit Do
    Loop While Acount <> " "
    End Sub

    Cheers
    Andy

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Quote Originally Posted by ajkiwi88
    what im trying to do is i have a value stored in A which can be either a full number (like 1) or a part number (like 1.1) if the number is a full number i want to take the value stored in col E and store in in a variable. If its a part number i want to take the value previously stored in the variable and multiply by the number in coll E and then place the result in coll F.

    this is where im up to but it seems to do nothing any help will be appreciated
    Sub Button1()
    Count = 2
    Do
    If (Int(Acount) = Acount) Then
    tempvalue = Ecount
    Else
    Fcount = Ecount * tempvalue
    End If
    Count = Count + 1
    Exit Do
    Loop While Acount <> " "
    End Sub

    Cheers
    Andy
    I hope that is not really your code. If it is, you need to put "Option Explicit" as the very first line on the code page, then correct all the errors that shows you.

    If it's not the actual code, you need to post the actual code for us to see.

    BTW, that "Exit Do" means the code will never loop. The "Exit Do" will make it jump out of the loop the first time the CPU sees it.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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