Solved

Insert text into column

Posted on 2013-05-24
7
302 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

911 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

20 Experts available now in Live!

Get 1:1 Help Now