apply same formula for a set of two consecutive rows

cbk40060

New Member
Joined
Jul 5, 2018
Messages
13
I am using the CONCATENATE function to combine the data of two columns.
But the same formula should be applied for the first two rows and the next series of the formula should be assigned to the next two rows.
I think I can explain it better with the following table:
Particulars of the travel :
Date of travel :29-08-2018
Sl.No.
(Column 'B")
Place_Code
(Column 'C")
Transaction description
(Column 'D")
1A=CONCATENATE("CUSTOMER TRAVELLED FROM ",C7," TO ",C8," ON ",TEXT(C4,"dd-mm-yyyy"))
2B=CONCATENATE("CUSTOMER TRAVELLED FROM ",C7," TO ",C8," ON ",TEXT(C4,"dd-mm-yyyy"))
3C=CONCATENATE("CUSTOMER TRAVELLED FROM ",C9," TO ",C10," ON ",TEXT(C4,"dd-mm-yyyy"))
4D=CONCATENATE("CUSTOMER TRAVELLED FROM ",C9," TO ",C10," ON ",TEXT(C4,"dd-mm-yyyy"))
5E=CONCATENATE("CUSTOMER TRAVELLED FROM ",C11," TO ",C12," ON ",TEXT(C4,"dd-mm-yyyy"))
6F=CONCATENATE("CUSTOMER TRAVELLED FROM ",C11," TO ",C12," ON ",TEXT(C4,"dd-mm-yyyy"))
7G=CONCATENATE("CUSTOMER TRAVELLED FROM ",C13," TO ",C14," ON ",TEXT(C4,"dd-mm-yyyy"))
8H=CONCATENATE("CUSTOMER TRAVELLED FROM ",C13," TO ",C14," ON ",TEXT(C4,"dd-mm-yyyy"))
9I=CONCATENATE("CUSTOMER TRAVELLED FROM ",C15," TO ",C16," ON ",TEXT(C4,"dd-mm-yyyy"))
10J=CONCATENATE("CUSTOMER TRAVELLED FROM ",C15," TO ",C16," ON ",TEXT(C4,"dd-mm-yyyy"))
11K
12L
13M
14N

<tbody>
</tbody>

In the above table, 'Sl.No.' is in column 'B', 'Place_Code' is in column 'C' and "Transaction description' is in column 'D".

In the above table, the third column (column 'D'), shows the output required by me.

I can get the result by manually applying the formula.

But since I have to work with many rows, I am looking for a macro to do the work for me
.
I wish I could have attached the sample excel file.

Any help in this connection, will be very much appreciated.

- CHANDRASHEKHAR
 
I have to do this for about 1000 rows and I want to accomplish this using a macro.
I am not able to make out how I have to put this code snippet in a macro, when the starting row is a even row.

I actually left the house to go somewhere, but came back in to answer your question.

To be honest, 1000 rows isn't "that" many rows to scroll down using my method above, it'll probably take just a minute.
And why are you insisting on a macro???

You can do this:

With your "identical" formula in D1 and D2 already in place.
Select BOTH D1 and D2, right click, Copy.
Hit F5 on keyboard, in the "Goto" dialogue box, enter D3:D1000, hold down "Shift", click OK
Now, click Control V, done.

That's as lazy as it gets. :)
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Thanks jtakw.
But I have to do this on a daily basis and I have to use the output in another macro.
So, please help me with a macro for this task.
 
Upvote 0

Forum statistics

Threads
1,215,162
Messages
6,123,382
Members
449,097
Latest member
Jabe

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top