X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Find And Replace Blanks (vba), Any Version    
post Jan 3 2020, 11:03 AM

Posts: 119
Joined: 30-October 15
From: Central CT USA

I'm running some VBA code from an MS Access application that has to fix up values in an Excel worksheet.

It needs to go through a huge worksheet (500,000 rows) and find all blank values in Column D and replace them with the values from column A (in the same row as the blank)

I wrote some code that walks down the rows and does this, but it's glacially slow.

Then I tried this, but it just replaces the blanks with the header from row 1 of column A:

.Columns("AG").Replace What:="", Replacement:=.Columns("AD"), LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False

Any suggestions?
Go to the top of the page

Posts in this topic

Custom Search

RSSSearch   Top   Lo-Fi    6th July 2020 - 06:13 PM