# 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
- Whatsapp-desktop-2-2401-5-0.msixbundle - Download - Instant messaging
- Xbox-2309-1001-3-0 - Download - Digital stores
- If a cell has text then return value ✓ - Excel Forum
- If cell contains date then return value ✓ - Excel Forum

## 2 responses

TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
552

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