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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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