# In cell C12 if>0 Copy C12 and A12 to A63

Solved/Closed
Related:

- In cell C12 if>0 Copy C12 and A12 to A63
- //192.168.l.0 - Guide
- If cell contains date then return value ✓ - Office Software Forum
- Highlight cell if another cell contains text ✓ - Excel Forum
- Based on the values in cells b77:b81, what function can automatically return the value in cell c77? ✓ - Excel Forum
- Insert the current date and time in cell a1 ✓ - Excel Forum

## 2 responses

TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
549

Oct 21, 2010 at 10:02 AM

Oct 21, 2010 at 10:02 AM

Hi Steve,

Now that I understand your query I can say that it is a very tricky one.

Basically I know two methods, but since the first one has limitations and the second one takes a lot of work I doubt you will find them usefull, but let's give it a try.

1. Use nested If's:

=IF(C12>0,C12&" "&A12,IF(C13>0,C13&" "&A13,IF(C14>0,C14&" "&A14, ... etc.

You are limited to nest 7 IF's.

2. Use VB code:

Depending on how much data you have this will take a lot of time.

Please note that I have still much to learn and that someone else could write a more effective code for you.

This is all I can offer you, sorry it's not a solid solution.

Best regards,

Trowa

Now that I understand your query I can say that it is a very tricky one.

Basically I know two methods, but since the first one has limitations and the second one takes a lot of work I doubt you will find them usefull, but let's give it a try.

1. Use nested If's:

=IF(C12>0,C12&" "&A12,IF(C13>0,C13&" "&A13,IF(C14>0,C14&" "&A14, ... etc.

You are limited to nest 7 IF's.

2. Use VB code:

Sub test() Range("A63").Formula = "=IF(C12>0,C12&"" ""&A12,"""")" If Range("A63").Value = "" Then Range("A63").Formula = "=IF(C13>0,C13&"" ""&A13,"""")" End If If Range("A63").Value = "" Then Range("A63").Formula = "=IF(C14>0,C14&"" ""&A14,"""")" End If 'Repeat for as many cells of data you have. If Range("A63").Formula = "=IF(C12>0,C12&"" ""&A12,"""")" Then Range("A64").Formula = "=IF(C13>0,C13&"" ""&A13,"""")" End If If Range("A63").Formula = "=IF(C13>0,C13&"" ""&A13,"""")" Then Range("A64").Formula = "=IF(C14>0,C14&"" ""&A14,"""")" End If '... etc. End Sub

Depending on how much data you have this will take a lot of time.

Please note that I have still much to learn and that someone else could write a more effective code for you.

This is all I can offer you, sorry it's not a solid solution.

Best regards,

Trowa