![]() |
Search for blanks
How do you write a macro that:
1) Searches an Excel-spreadsheet and checks if contents of is cell is numeric. 2) If content is numeric then search cell for blanks and if blanks are found replace them with nothing? E.g. I have a cell containing 55 22 11 and I want to replace it with 552211. However I do not want: e.g. 'Market value' to be replaced by 'Marketvalue'. Please help me on this one!!! -- I am very thankful for any fast assistance! |
Search for blanks
You can use the ISNUMERIC function on a cell to check if its a number, then
use the REPLACE function to replace " " (spaces) with "" (nothing). Hope that helps! "SamanthaK" wrote: How do you write a macro that: 1) Searches an Excel-spreadsheet and checks if contents of is cell is numeric. 2) If content is numeric then search cell for blanks and if blanks are found replace them with nothing? E.g. I have a cell containing 55 22 11 and I want to replace it with 552211. However I do not want: e.g. 'Market value' to be replaced by 'Marketvalue'. Please help me on this one!!! -- I am very thankful for any fast assistance! |
All times are GMT +1. The time now is 10:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com