Posts by yaaargh000

    I am making a datasheet with some values on it that corresponds to a project I'm working on. The data is in a table like manner with dimensions 4 x 5. Whenever I try to sort only one column sorts and the remaining data in the row is out of sync. Is there a way for me to sort so that everything in one row stay together?

    I am trying to write a macro that takes the data from an Excel cell, opens up a txt file, searches for that particular data, and if found, extracts the text that comes right after the data that was found into a cell in Excel?
    I was wondering if this was possible and if possible I could get some help.

    I am trying to write a macro that takes individual cells from and Excel worksheet, and uses the data in the cell to Find that same data in a Word document. If there is a match in Word I have to parse the text after the data, whatever it may be.


    AA456789 GENE

    AA456789 would have been the data in the Excel cell and I would've used that to search for in the Word document. If it found something, like in the example, it would extract the text after the data (in this case GENE) and paste it onto the cell to the right of the searched for data. After its done with one it goes to the next one.

    Any help on this would be greatly appreciated.

    I am trying to write a macro that suppose to detect a worksheet with a given name, and if the worksheet isn't present, then it will create it. I've tried multiple times but all of my attempts have failed.

    This is what I have so far:

    If Sheets("Acc").Select = Err Then
    Set newsheet = Worksheets.Add
    newsheet.Name = "Acc"

    But I keep getting an error. Any help would be greatly appreciated.

    I was wondering if there was a way to write a macro that would only search for cells that contained text instead of always specifying the max limit (65536) because whenever I'm trying to debug the macro, it takes forever for the macro to complete its operation and then using the replace function to replace certain parts of the text.
    Any help would be greatly appreciated.

    I am currently writing an Excel macro that suppose to select all of the data in column A of a sheet and paste that data in another sheet in column A. I would then sort the data and invoke the Find command. Because the data contains many prefixes, how do I go about searching for all of the prefixes of one type and then copy that and paste it onto column B. And then another for column C and so on. Any help would be greatly appreciated.

    Here is the code:
    'Selecting the 1st sheet

    'Designating the range to be selected

    'Copy column A data and paste them in a new sheet in column A

    'Sort the pasted selection
    Application.CutCopyMode = False
    Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

    'Find all of the "AA" Prefixes
    Cells.Find(What:="AA", after:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _

    This is what I have so far. The only problem is that I want the macro to find all of the "AA" prefix and then copy and paste them onto column B. Please help.
    And also, if I were to use the Next function, it would go to the right of the cell, is there a way to make it go to the bottom of the cell?