English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am using vba with excel and I'm trying to write a formula that hides all rows with values of FALSE. However, when the macro searches through the string it looks at the formula and therefore finds no FALSE cell values despite the sheet being covered in them. I can get this macro to work with numbers but not with text.

2006-12-28 03:34:57 · 6 answers · asked by r_shotton 1 in Computers & Internet Programming & Design

6 answers

You are using macro to record your find action, right?
If so
In your Find command line in your macro search for the text that says
LookIn:=xlFormulas
and replace it with
LookIn:=xlValues

Your line may be looks like this
ells.Find(What:="false", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate

So just replace the text in above line from "xlFormulas" to "xlValues"

Enjoy my profile, I am the VBAXLMan

2006-12-29 23:06:40 · answer #1 · answered by Anonymous · 0 0

1

2017-01-22 12:16:28 · answer #2 · answered by Anonymous · 0 0

I just tried loading some number in cells and using an if to place TRUE or FALSE in next column...

Using the following in VBA in the sheet activate event
Cells.Range("C6") = Cells.Range("B3")

I had no problem copying the computed value of FALSE into cell C6

Perhaps if you could share a little more details on your code would be helpful...

2006-12-28 03:47:06 · answer #3 · answered by MarkG 7 · 0 0

Highlight and copy the column, highlight a blank column and do a paste special (not just paste), click on values, and paste. You should be able to work on that new column.

2006-12-28 03:41:00 · answer #4 · answered by mis d 3 · 0 0

cells(row, column).value is the correct coding

2006-12-28 11:04:06 · answer #5 · answered by Renaud 3 · 0 0

Use

cells(y,x).value

2006-12-28 03:42:46 · answer #6 · answered by Robin the Electrocuted 5 · 0 0

fedest.com, questions and answers