Help with loop code

remejiah

New Member
Joined
Jul 13, 2016
Messages
18
I have a column of account numbers that I need to individually copy and paste into another worksheet that will yield a result and then I want to paste that result next to the account number and perform that function until there are no more account numbers. Can some one please help?
A1 B1
Account NumberResult
11001696802
(FIRST RESULT)
10002370000

<tbody>
</tbody>


(other sheet)

CELL A2 is where I should paste the account number
CELL N1 is where the result appears
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
unclear.
cant you just copy the ACCT# column,
paste into a new sheet, the say remove duplicates? Is that what you want?
 
Upvote 0
I need it to copy the account number, paste it to another sheet where I have written numerous formulas to manipulate data and come up with a result. Then I want to copy that result and paste it next to the priginal account number. Then I want to move to the next account number in the column and repeat until there are no more account numbers.
 
Upvote 0
Macro Help - loop

WHAT I HAVE

I have a set of account numbers in a spreadsheet. They are on a sheet named 'data' in the A column beginning with cell A2.

On a separate sheet named 'configure' - I have written some formulas to do various calculations based on an account number. If the account number is pasted in cell A2 of the 'configure' sheet, then the desired result appears on the 'configure' sheet in cell N1.

WHAT I NEED

I need a way to build a loop macro that will cycle through the list of account numbers in column a, pasting them individually in the 'configure' sheet, yielding the result, copying the result, and pasting it into the cooresponding B column on the 'data sheet' (next to the original list of account numbers).

Ideally, I would like to be able to attach it to a macro button so that as I change the account numbers on the 'data' sheet, I can press the button, run the macro and get the result.

Thanks a million for any help that you can provide. I'm very good at formulas, but never learned much VBA code. Also if anyone can give a good tried and true resource to learn more of this, please let me know.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

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