Hello all,
I'm new to the forums and registered as a last-ditch effort to try and get this project completed. Help would be much appreciated.
I'm trying to create a macro button, but the problem is that I don't know proper VBA syntax.
I've imported a table of data into Excel:
I need the macro button to search column E for a range of numbers (These numbers cannot be sorted because each row is affiliated with the row directly beneath it or directly above it.) They come in sets of two, and I need to extract data from both of these rows to have the information required. The first row of the group has the Date in Column A and the bottom row of the group has the Time in Column A.
I've thought of the best way to do this, I just need to figure out how to tell excel to do it...
- I'm going to allow a range of numbers to be searched in column E (Ex: 400 - 450)
- For every number found in that range, it will look at column A of that row and check to see if the row is displaying the Date or the Time.
- If the row displays the Date in column A, then column E and column C of the row directly beneath it will extracted.
- If the row displays the Time in column A, then column E and column C of the row directly above it will be extracted.
So the button will return the info for the entire row of the values found.
-----
The other issue I have though is the format that the Date and Time is in. The time looks normal, but the date is shorthanded. For example, today's date would be written as: Mon 2/4
Is there any way that excel can still recognize this date format?
Because I'd also like to be able to search a row based on the numbers in column E AND column A (Date/Time)
-----
Also, the range of values varies, depending on the imported document. So I'd also need a function that can automatically figure out the range.
I've been reading on the INDEX, MATCH, and LOOKUP functions. But I'm still not sure about the best way to utilize these functions for my purpose.
Thanks a lot for reading, and for your feedback if possible.
Bookmarks