Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Replacing values in Excel with an X

19 views
Skip to first unread message

PaddyStan

unread,
Nov 23, 2021, 11:04:29 PM11/23/21
to
I have an Excel spreadsheet with values in certain cells, but not all - the rest are blank.

I want to replace ONLY those with a value with an 'X'. The blank ones I want to leave blank.

Please advise.

Thanks

PaddyStan

Ammammata

unread,
Nov 24, 2021, 3:23:30 AM11/24/21
to
Il giorno Wed 24 Nov 2021 05:04:27a, *PaddyStan* ha inviato su
microsoft.public.excel il messaggio
news:290a5f68-d457-41f2...@googlegroups.com. Vediamo
cosa ha scritto:
https://i.imgur.com/G4xiAPs.png

--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
........... [ al lavoro ] ...........

PaddyStan

unread,
Nov 25, 2021, 5:23:05 PM11/25/21
to
On Wednesday, November 24, 2021 at 7:23:30 PM UTC+11, Ammammata wrote:
> Il giorno Wed 24 Nov 2021 05:04:27a, *PaddyStan* ha inviato su
> microsoft.public.excel il messaggio

> cosa ha scritto:
> > I have an Excel spreadsheet with values in certain cells, but not all
> > - the rest are blank.
> >
> > I want to replace ONLY those with a value with an 'X'. The blank ones
> > I want to leave blank.
> >
> > Please advise.
> >
> >
> https://i.imgur.com/G4xiAPs.png
>
> --
> /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
> -=- -=- -=- -=- -=- -=- -=- -=- - -=-
> ........... [ al lavoro ] ...........
Ammammata

My apologies. I do not appear to be able to view your reply.

Kindest regards

PaddyStan

PaddyStan

unread,
Nov 25, 2021, 10:21:51 PM11/25/21
to
I think I've found it:

Sub FindReplace()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
If Rng.Value > 0 Then
Rng.Value = "X"
End If
Next
End Sub

Ammammata

unread,
Nov 26, 2021, 3:08:57 AM11/26/21
to
Il giorno Thu 25 Nov 2021 11:23:02p, *PaddyStan* ha inviato su
microsoft.public.excel il messaggio news:355e4464-2830-4edc-9c62-
b6111d...@googlegroups.com. Vediamo cosa ha scritto:

>> https://i.imgur.com/G4xiAPs.png
>>
>
> My apologies. I do not appear to be able to view your reply.
>
>

my reply it's a screenshot with some data and a find&replace command

I just tested the link, it's working: maybe you can try with a smartphone
or a different computer

PaddyStan

unread,
Dec 1, 2021, 2:33:38 AM12/1/21
to
On Friday, November 26, 2021 at 7:08:57 PM UTC+11, Ammammata wrote:
> Il giorno Thu 25 Nov 2021 11:23:02p, *PaddyStan* ha inviato su
> microsoft.public.excel il messaggio news:355e4464-2830-4edc-9c62-
> Vediamo cosa ha scritto:
>
> >> https://i.imgur.com/G4xiAPs.png
> >>
> >
> > My apologies. I do not appear to be able to view your reply.
> >
> >
> my reply it's a screenshot with some data and a find&replace command
>
> I just tested the link, it's working: maybe you can try with a smartphone
> or a different computer
> --
> /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
> -=- -=- -=- -=- -=- -=- -=- -=- - -=-
> ........... [ al lavoro ] ...........
Ammammata

Your solution works perfectly!

Many thanks.

I've just posted another one.

PaddyStan
0 new messages