Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 03-30-2025, 01:45 AM
MartinGM MartinGM is offline Can a cell be both blank and not blank ? Windows 11 Can a cell be both blank and not blank ? Office 2021
Competent Performer
Can a cell be both blank and not blank ?
 
Join Date: May 2023
Location: England
Posts: 108
MartinGM is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
A small Power Query solution will clean that up.
Text is highlighted in yellow. After transformation, the null string has disappeared


Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,Table.ColumnNames(Source))
in
    #"Replaced Value"
Thanks again
I couldn't work out how to detect the errant cell in "pure" VBA but a simple use of the Worksheet functions did the trick - here's the critical line

Code:
If Application.CountA(Cell) = 1 And Application.CountBlank(Cell) = 1 Then
Now to find out how this happens

Martin
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
IF cell in Col A is populated BUT cell in Col C is blank DELETE ROW ChrisOK Excel Programming 7 05-05-2019 09:00 PM
Can a cell be both blank and not blank ? Fill blank cell with value from adjacent cell kevinbradley57 Excel Programming 2 04-17-2018 08:40 AM
Can a cell be both blank and not blank ? Formulato say if cell is blank do this, if not blank do this. mbesspiata Excel 1 01-17-2015 05:02 AM
Can a cell be both blank and not blank ? not showing blank cell alw Excel 4 03-13-2014 01:08 PM
Can a cell be both blank and not blank ? How to turn all blank lines into non-blank for legal forms sieler Word 3 04-12-2009 01:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft