Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just wanted to find every cell that had font size 18 in it. That cell
value was deleted from a string of values. I was looking for values that hadn't been used yet. After running the process, that's what is left in the string. Other than that I had no interest in preserving what was found. "Available" is the starting string and "FoundFirst" is my range variable holding the found cell with font size 18. So I do a lot of: Available = Replace(Available, FoundFirst, "") The find method must be looking at every cell and doing some sort of "if... then" thing just like a for/next loop. I'm just old school believing "machine language" is faster than "compiled language" when doing things. John Rick Rothstein wrote: While the output we all produced is the same, the method to get there is different. My code creates a range via the Union function whereas the others' code simply concatenates the addresses into a string for display. The difference is that the range I produce from the union can be manipulated directly in the routine as needed (select all the cells, change the cells' format in some way, etc.). Now, it is true, you can do the same to the Range(rngfound.Address) range, but I don't know if that would be considered as "clean" a method to use or not. As for your speed question... I'm not entirely sure how fast creating Unions are, but I don't think the mechanism is all that slow; string concatenations, on the other hand, is not one of VB's speediest processes (especially if the strings get large in value). |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Font color based on font type or size | Excel Discussion (Misc queries) | |||
change font size on screen, but prints in old size | Excel Discussion (Misc queries) | |||
Change all text one font size up with various font sizes used. | New Users to Excel | |||
My tabs' font size is smaller - how do I restore default size? | Excel Discussion (Misc queries) | |||
Dropdown list for font size, font type and number formats | Excel Programming |