Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Insert text into column

I need to do the following to insert text on one sheet based on a column not being null on another sheet.  I need help with the VBA.

If sheet4 column AP is not null
Insert "1"  into Sheet19 column D
where sheet4 columnC = Sheet 19 Column A   -----        ' for the ID number to match

Thanks in advance.
0
leezac
Asked:
leezac
  • 3
  • 2
2 Solutions
 
jsdrayCommented:
copy this down sheet19 column D : =IF(ISBLANK(Sheet4!AP1),"",1)
copy this down sheet4 column C: =IF(ISBLANK(Sheet4!AP1),"",Sheet19!A1)
0
 
Saqib Husain, SyedEngineerCommented:
=IF(INDEX(Sheet4!AP:AP,MATCH(A1,Sheet4!C:C,0))<>"",1,"")

If there is a possibility that sheet19 column A is not found on sheet 4 column C then you can use this formula

=iferror(IF(INDEX(Sheet4!AP:AP,MATCH(A1,Sheet4!C:C,0))<>"",1,""),"Not found")

if you are using version 2003 then change the second formula to

=if(iserror(IF(INDEX(Sheet4!AP:AP,MATCH(A1,Sheet4!C:C,0))<>"",1,"")),"",IF(INDEX(Sheet4!AP:AP,MATCH(A1,Sheet4!C:C,0))<>"",1,""))
0
 
leezacAuthor Commented:
Thank you - I will test today the suggestions.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
leezacAuthor Commented:
I am using 2003 now but will be converting to 2010 in the future.
0
 
Saqib Husain, SyedEngineerCommented:
The third formula will work on all versions.

The second formula will not work on 2003.
0
 
Saqib Husain, SyedEngineerCommented:
Only one of the answers could be correct. Then why split points?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now