Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "Toppers" wrote in message ... You will need a macro and a VERY clear set of rules. The obvious one from your example is how is it decided whether it is 2 or 21 that is required. "A.S." wrote: Is there a macro that does a search in different sheets for you? Here is the complicated scenario I am trying to create: Let's say in Sheet 1, I have a cell with the number 305212344. Now, through minor analysis, we know that the number 305 is the signifier for this number. Meaning, once the excel realizes that it is looking for 305 it then serches the 5 other data sheets for the 305 data. Once it finds the 305 data, it then looks at the data for 305 and looks at the remaining numbers of 212344 and tries to find the number 21 in this data (the number can vary in length). Once it finds the 21 it looks at the length of the remaining numbers (2344 in this case) and sees if the length matches the length of digits given for 21. As mentioned the second search, the number length may vary, so that instead of 21, it may be looking for 2 so 12344 is left and it counts those digits (5) and checks to see if that number matches to the number of digits required by 2. Again, I know this is complicated, but I wanted to see if there was anyway possible of doing this. Thanks in advance. This could be a fun macro to code. in general, book: Mr Excel on Excel has a macro to search all sheets (the standard Find only searches the current sheet) gather all the 305 rows in a new sheet trim off the leading 305 loop data select case case 2: if len(correct) then process case 21: if len(correct) then process end case next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Add formula to Macro??? | New Users to Excel | |||
Macro to insert formula | Excel Worksheet Functions | |||
Relative cells in macro - and pasting a formula too! | Excel Discussion (Misc queries) | |||
Macro Formula | Excel Discussion (Misc queries) | |||
Macro - formula for end of last row | Excel Worksheet Functions |