Creating a Loop and Output table in Access

eaddi

New Member
Joined
Apr 2, 2012
Messages
24
Hello,

I am new at creating Loops in Access. I want create a new column for each new occurrence of a ID using a loop. If there is a better way to accomplish this I am open to ideas.

Below is what I want to accomplish.

Table A

IDException IdException Date
ABC555767/4/19
XYZ327976/8/19
OPQ862904/2/19
ABC7547912/6/19
XYZ575801/18/19
XYZ170835/9/20

<tbody>
</tbody>


Output Table
IDEXC1EXC2EX3EXC_DT1EXC_DT2EXC_DT3
ABC55576754797/4/1912/6/19
OPQ862904/2/19
XYZ3279757580170836/8/191/18/195/9/20

<tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi,
What's wrong with the data in the format it already is in? Three columns sorted by Id, Exception, and Exception Date - looks great (maintainable, informative, scalable, and efficient)
 
Upvote 0
I have to compile the data by id to enter into another system. All data associated with each unique Id must be concatenated to be entered into a single field in another system. My ultimate entry will look like ID, Concatenate (Exc1,Exc2, Exc3), Concatenate (ExcDt1, Exc1Dt2, ExcDt3). I'm looking for a way to reduce the steps taken to create my ultimate format.
 
Upvote 0
What would happen if there were more than three exception dates, or more than three exception IDs?
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

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