Solved

Insert text into column

Posted on 2013-05-24
7
336 Views
Last Modified: 2013-06-03
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
Comment
Question by:leezac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 9

Assisted Solution

by:jsdray
jsdray earned 50 total points
ID: 39196009
copy this down sheet19 column D : =IF(ISBLANK(Sheet4!AP1),"",1)
copy this down sheet4 column C: =IF(ISBLANK(Sheet4!AP1),"",Sheet19!A1)
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 450 total points
ID: 39196140
=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
 

Author Comment

by:leezac
ID: 39197756
Thank you - I will test today the suggestions.
0
Industry Leaders: 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!

 

Author Comment

by:leezac
ID: 39199518
I am using 2003 now but will be converting to 2010 in the future.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39199568
The third formula will work on all versions.

The second formula will not work on 2003.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39206715
Only one of the answers could be correct. Then why split points?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question