Write cell error (formular)

I want to write formular in excel

formular = =IF(COUNTIF(C$2:C2,C2)>1,“Y”,“N”)

But error as below.

Hi @fairymemay

Try this

"=IF(COUNTIF(C$2:C2,C2)>1,""Y"",""N"")"

No need to use .ToString at last

Hi @fairymemay

Try this:

"=IF(COUNTIF(C$2:C2, C2) > 1, ""Y"", ""N"")"

Hope it helps!!

@Parvathy After write cel.

I want to value text not formular.
How to solve it?

image
l

I have more question.

If I want to use column name in cell that write (write in column name = Check_remark)

How to write it?

image

@fairymemay

You have to give column Index like

“C”+counter.ToString

It’s can’t use column name right?

@fairymemay

yes, it can’t take column name

@fairymemay

FYI, There is another approach

So, it writes total rows in C Column without using for each

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.