Formula column number same as the row it reads from another column, through loop

karthidurai

New Member
Joined
May 6, 2019
Messages
1
I have a sheet automatically created, depend on some condition I need to read the values on the column A, check with another sheet whether it exists , and print "Yes" or "No" on column D. The formula in column D is "=IF(ISNA(MATCH(A4,proj_req!F:F,0)),""No"",""Yes"")"
How can I create a loop stmt so that column D has the above formula, i.e
Do While current_Row < lastRow
ThisWorkbook. Sheets("features").Range("D" & current_Row).formula = "=IF(ISNA(MATCH(A4,proj_req!F:F,0)),""No"",""Yes"")" current_Row = current_Row + 1
Loop

inside MATCH(A should have the same row as the D current_Row)

Could you do the needful?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
welcome. if I understand correctly, the loop is not needed. how is this,

Code:
ThisWorkbook.Sheets("features").Range("D" & current_Row & ":D" & lastRow).FormulaR1C1 = "=if(isna(match(rc1,proj_req!c6:c6,0)),""No"",""Yes"")"
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top