ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   excel macro (https://www.excelbanter.com/excel-discussion-misc-queries/258744-excel-macro.html)

Christina

excel macro
 
I need help creating a macro. I dont not know to write codes, I just record
a macro, doing the steps. See eg. below.
I have been able to copy the vendor name next to the invoice numbers, and
need to go to the next vendor ID "CALADIUM" and repeat the same process.
Also need to continue to end of data .

If codes are given, I would need detail instructions please. THanks

Cristina Seawell

A B C
D
Vendor ID
Brodies
Invoice #1 6/3/2010 $10.00
Invoice #2 6/4/2010 $20.00
Invoice #3 6/5/2010 $30.00
Invoice #4 6/6/2010 $40.00

Vendor ID
Caladium
Invoice #5 6/3/2010 $10.00
Invoice #6 6/4/2010 $20.00
Invoice #7 6/5/2010 $30.00
Invoice #8 6/6/2010 $40.00

I made a macro and have been able to copy the vendor ID next to the invoice
Numbers for Brodie, then a search for "vendor ID", and selected the cell
above CALADIUM. then would like to move to next cell below and copy the name
Caladium next to the invoice number(will copy the codes already in the macro)
and continue down the sheet until there is no more data.


Luke M[_4_]

excel macro
 
I think you can do this with no macro at all (or, you can record this
process and possibly have a macro...)
Select used portion of column A (say A1:A100). Press Ctrl+g to bring up the
Go-to dialogue, then click on special. Choose blank cells, ok.
Now, start typing a formula by pressing "=", and then press the up arrow.
You should have a formula referencing the cell directly above the active
cell. Next, press Ctrl+Enter to apply that formula to all selected cells
(which are all the blank ones).

In macro form, this looks like:

Sub FillAbove()
'Change this line as appropriate
Range("A1:A100").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub

--
Best Regards,

Luke M
"Christina" wrote in message
...
I need help creating a macro. I dont not know to write codes, I just
record
a macro, doing the steps. See eg. below.
I have been able to copy the vendor name next to the invoice numbers, and
need to go to the next vendor ID "CALADIUM" and repeat the same process.
Also need to continue to end of data .

If codes are given, I would need detail instructions please. THanks

Cristina Seawell

A B C
D
Vendor ID
Brodies
Invoice #1 6/3/2010 $10.00
Invoice #2 6/4/2010 $20.00
Invoice #3 6/5/2010 $30.00
Invoice #4 6/6/2010 $40.00

Vendor ID
Caladium
Invoice #5 6/3/2010 $10.00
Invoice #6 6/4/2010 $20.00
Invoice #7 6/5/2010 $30.00
Invoice #8 6/6/2010 $40.00

I made a macro and have been able to copy the vendor ID next to the
invoice
Numbers for Brodie, then a search for "vendor ID", and selected the cell
above CALADIUM. then would like to move to next cell below and copy the
name
Caladium next to the invoice number(will copy the codes already in the
macro)
and continue down the sheet until there is no more data.





All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com