Repeat

  • Thread starter Thread starter Steved
  • Start date Start date
S

Steved

Hello from Steved

Please How does one write a function so that if i put in
cell A:1 5577 and I want to put 5577 in cell A:22 the
function will do it for me, as the repeat last function
does not seem to allow me to to do this operation.
TIA
 
Hi Steved!

Surely all you want in A22 is:

=A1

But if what you are asking is how to put the same entry in two cells
use:

Select A1
Press Ctrl and hold down
Select A22
Release Ctrl
Type your formula
Press Ctrl and hold down and then press Enter

But are you referring to something else?



--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
Holidays and Observances Friday 18th July: Mexico (Day of Mourning
death of Benito Juarez), Spain (Labor Day), Uruguay (Constitution Day)
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi Steve!

From other questions you've asked I just knew that it must be
different.

Try the following Event handling subroutine in the sheet module for
the sheet with A1 in it:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then End
Application.EnableEvents = False
Range("A22").Value = Range("A1").Value
Range("A112").Value = Range("A1").Value
Range("A127").Value = Range("A1").Value
Application.EnableEvents = True
End Sub

It seems to do what you want.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
Holidays and Observances Friday 18th July: Mexico (Day of Mourning
death of Benito Juarez), Spain (Labor Day), Uruguay (Constitution Day)
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi Steved from Steve D. <g>

If I'm reading you correctly, why not just put =A1 into A2, then copy it
down to the bottom of your list. That way the last entry will always be
repeated down to the bottom. If you don't want to overwrite the formula
cells, use another column (say D) for entering the numbers, and a formula
such as:

=IF(D2<>"",D2,A1)

in column A.

HTH
Steve D.
 
Hello Steve
Thanks for reply

Steve I could have over 500 different numbers (Drivers)
doing these individual trips. Each row from B:1 is a
unique trip so A:1 might be driver 5577 A:3 might be
Driver 5588, hence the need to create a function that
will repeat the last entry, otherwise I have to type the
5577 (Driver) in Cell as an example A:1 then goto Cell
say A:377 and type in 5577. I am saying that Control Y or
F4 will normally do this function, but in my case it does
not do it.

Hopefully you may be able to assist here.

Cheers
 
Hi Steve(s)

First, let's get F4 / Ctrl Y in it's place.

That shortcut merely repeats a command and *not* an entry. So you can
use it to repeat formatting commands etc but not cell entries.

Second, let's get cell referencing correct. It's A1 *not* A:1. The
colon is used for ranges such as A1:A200 or A:A (for column A).

Third, I think my subroutine did what you asked. When an entry was
made in A1 it replicated that entry in the three cells that you
nominated (A22, A112 and A127).

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
Holidays and Observances Friday 18th July: Mexico (Day of Mourning
death of Benito Juarez), Spain (Labor Day), Uruguay (Constitution Day)
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Ahah! Now I see where you're coming from, I think...

After typing 5577 into A1, copy it (Ctrl+c), then paste it (using Ctrl+v) to
the other cells where you need it.
 
Hi Steve (Stage Coach),

Is this what you want to do?
1) select the different trips that will be driven by a particular driver.
2) enter the driver's number once and all the trips will be indicated as to
be driven by this driver?

Then this is a data entry job.

There will be many methods to achieve this.

Have you consider using auto-filter, Ctrl-f and F5 to do your data-entering?

Perhaps you can consider.
1) label column C or whatever is the next available blank column with "Trips
driven by same driver". Supposedly, columns A, B are labelled "Driver" and
"Trips" respectively.
2) click once anywhere on the trips
3) click data-autofilter, check to ensure that all the columns and rows
containing data is included. That is include the label headings, all the
data uptill the last row. So if your last trip is in row 500, your range
should be A1:C500.
4) type "1" in column C for all trips to be driven or already made by the
same driver. This could be say, at C7, C28, C349 etc. using Ctrl-f to help
you find the necessary trip description (e.g. find "auckland") or using F5
to goto the corresponding cell (e.g. entering "C349" in cell to go to).
5) click on the auto-filter button in column C and select 1. All trips that
are driven (or to be) by same driver is selected.
6) Select the cells in column A which corresponds to data in column B except
the heading lable. use F5, Special, Visible cells, enter driver number 5456,
Ctrl-Enter.

If I have helped you in anyway, I look forward to receive a sponsored ride.
Upon receipt of travel voucher for my whole family, I can even show how it
can be done faster :P

....But if I'm way off, just be a grinning koala bear, grin and bear with me,
OK? only trying to help.

Regards,

Keng Hua
 
Hello Chua Keng

Well about this family trip You may need to wait for a few
days, as this is Saturday and I will be back at work on
Monday. I will be only to happy to reply to your solution
to my situation.

Thankyou
 
Hello Norman from Steved

Of course it is A1,I do not understand as to why I put A:1
I do so many simple formulas involving : so I must have
being thinking else where, hence I now understand why
nobody was understanding what I was trying to acheive, in
this particular exercise. I will be back at work in a
couple of days and I will use your solution, and see how
I get on.Once again thankyou.
 
Hello Steve

Steve, that is how I have been doing it, and after you do
it several hundred times, I thought there has to be a
better way. Thanks for taking timeout.
 
Steved said:
Hello from Steved

Please How does one write a function so that if i put in
cell A:1 5577 and I want to put 5577 in cell A:22 the
function will do it for me, as the repeat last function
does not seem to allow me to to do this operation.
TIA

How about a copy and paste? Type 5577 in A1. Re-select A1, type ctrl-c.
Now go to the next desired cell (i.e. A22) and type ctrl-v. Repeat the
ctrl-v step in other cells as necessary.

Dave
dvt at psu dot edu
 
Hi Chua!

"a grinning koala bear"

The wonders of newsgroups! A new specie discovered.

Any similarities with the Aussie marsupial the Koala? <bas>


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
Holidays and Observances Saturday 19th July: Andorra (Canillo), France
(Edgar Degas Birthday), Laos (Independence Day), Malaysia (Birthday of
Yand di-Pertuan Besar of Mg Sembilan), Myanmar (Martyrs’ Day),
Nicaragua (Liberation Day).
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top