Posts by samirfeil


    This should be something very straightforward for some, but its causing me big headaches!!

    I have a column (E) which contains three possible genders, Male or Female or NA.

    I have a routine which determines the number of rows in the dataset, called RowCount.

    All I want, is for a loop to start at cell E2, read it and determine if its Male or Female, and if its Male, change the cell value to 1, and if its Female, change it to 2 and otherwise, 3.

    I then want the loop to increment the rowcount by 1 and go down to the next cell, until it reaches the end row.

    Ive been trying to do something like:

    However, firstly, it doesnt like the IF statements, I keep getting the lack of End If or End Block error. Secondly, it does seem to read the cell as I have tried a MsgBox, but , it doesnt change its contents.

    Seems a really simple thing to do, but I just cant get it to work.

    Any help would be much appreciated!