Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2006

Tip: Looking for answers? Try searching our database.

help to paste

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ian123 - 07 Jun 2006 21:35 GMT
i have a cell which will have a number put in it.how do i tell exel to paste
to different cells (depending on what number is put in the cell)

EXAMPLE :
if the cell contains "1" then paste "hello" in cell A2

if cell contains "5" then paste  "hello" in cell F6
RJ - 07 Jun 2006 21:41 GMT
You can put a formula in cell A2:

=if(A1=1,"Hello","")

And cell F6 would have the formula:

=if(A1=5,"Hello","")

If you did not want to put formulas into all of the cells you want the
message to appear then you would have to use some VBA. I could provide some
sample codes, but for a new user this might be a little overwhelming.

> i have a cell which will have a number put in it.how do i tell exel to paste
> to different cells (depending on what number is put in the cell)
[quoted text clipped - 3 lines]
>
> if cell contains "5" then paste  "hello" in cell F6
ian123 - 07 Jun 2006 22:17 GMT
thanks for replying maybe i do need a VB sample.
Maybe I originally explained it To simply :(
Basically instead of hello i really want to print an address on a different
sheet(one address line per cell vertically)  but i have about 100 different
addresses.
Example:

IF cell a2 on sheet 1 says "1" then copy the address (which is also on sheet
1 to cells d1 to d5 on sheet 2

if cell A2 on sheet 1 says "54" then copy THAT address (which is also on
sheet 1) to cells d10 to d15 on sheet 2

> You can put a formula in cell A2:
>
[quoted text clipped - 15 lines]
> >
> > if cell contains "5" then paste  "hello" in cell F6
Don Guillett - 07 Jun 2006 21:58 GMT
right click sheet tab>view code>insert this>modify to suit>SAVE
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$G$1" Then Exit Sub
Cells(Target + 1, Target).Value = Target

End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>i have a cell which will have a number put in it.how do i tell exel to
>paste
[quoted text clipped - 4 lines]
>
> if cell contains "5" then paste  "hello" in cell F6
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.