View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ernest Lai Ernest Lai is offline
external usenet poster
 
Posts: 9
Default IF statement to add data when blank

In each row i have 7 parts fields - labled "part1" - "part7". If they are
all blank, I want to insert "NPF" into "Part1 (no part fitted)

I cant use find and replace as that only searches individual text boxes.
And my parts could be in any of the 7 parts columns.

Can I do something like this:

IF part1 ="" AND part 2 ="" AND ... part 7 =""
THEN insert "NPF" in part1
Else move to next row

So the code searches row by row

Any help is much appretiated, thank you in advance.

Ernest

(ps. hope it makes sense lol)