Solved

Insert text into column

Posted on 2013-05-24
7
314 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
  • 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
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.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now