Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Keep Original Sheets Font Format when Populating data into other sheet

Is use this sort of code to pupulate data from one sheet to the other:

With ActiveWorkbook.Worksheets("Sheet A")
..Select
Dim rngFound As Range
On Error Resume Next
' Gain the Location of the Combobox.Value
With Worksheets("Sheet B").Range("A:A")
Set rngFound = .Find(What:=Me.TextBox4.Value, After:=.Range("A1"),
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False)
' Place Data
Range("O4").Value = TextBox4.Value
Range("O2").Value = rngFound.Offset(-1, 4).Value
Range("E2").Value = rngFound.Offset(-1, 2).Value
Range("E4").Value = rngFound.Offset(0, 2).Value



I want the Font Format to be AS IS from sheet1 to sheet2.

Some of the Fonts haver Font.Strikethrough, but when the data is copied to
the other sheet using the above code, the fonts are always normal.

How can i adapt the code to do this?
Is it possible to do this by a line of code, rather than changing each
(rngFound.offset(*,*)) line ?


Corey....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Keep Original Sheets Font Format when Populating data into other s

All you are doing is making one value equal to the other. you are not doing
anything to change the formats. To do that the easiest is to copy and paste
(or pastespecial if your found cells are formulas.). There is no easy one
liner as you would like...
--
HTH...

Jim Thomlinson


"Corey ...." wrote:

Is use this sort of code to pupulate data from one sheet to the other:

With ActiveWorkbook.Worksheets("Sheet A")
..Select
Dim rngFound As Range
On Error Resume Next
' Gain the Location of the Combobox.Value
With Worksheets("Sheet B").Range("A:A")
Set rngFound = .Find(What:=Me.TextBox4.Value, After:=.Range("A1"),
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False)
' Place Data
Range("O4").Value = TextBox4.Value
Range("O2").Value = rngFound.Offset(-1, 4).Value
Range("E2").Value = rngFound.Offset(-1, 2).Value
Range("E4").Value = rngFound.Offset(0, 2).Value



I want the Font Format to be AS IS from sheet1 to sheet2.

Some of the Fonts haver Font.Strikethrough, but when the data is copied to
the other sheet using the above code, the fonts are always normal.

How can i adapt the code to do this?
Is it possible to do this by a line of code, rather than changing each
(rngFound.offset(*,*)) line ?


Corey....



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Keep Original Sheets Font Format when Populating data into other s

Jim,
thanks for ther reply.

So something like this:
rngFound.Offset(-1, 4).Copy
Range("O2").Paste

And do likewise to ALL cells?


"Jim Thomlinson" wrote in message
...
All you are doing is making one value equal to the other. you are not
doing
anything to change the formats. To do that the easiest is to copy and
paste
(or pastespecial if your found cells are formulas.). There is no easy one
liner as you would like...
--
HTH...

Jim Thomlinson


"Corey ...." wrote:

Is use this sort of code to pupulate data from one sheet to the other:

With ActiveWorkbook.Worksheets("Sheet A")
..Select
Dim rngFound As Range
On Error Resume Next
' Gain the Location of the Combobox.Value
With Worksheets("Sheet B").Range("A:A")
Set rngFound = .Find(What:=Me.TextBox4.Value, After:=.Range("A1"),
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False)
' Place Data
Range("O4").Value = TextBox4.Value
Range("O2").Value = rngFound.Offset(-1, 4).Value
Range("E2").Value = rngFound.Offset(-1, 2).Value
Range("E4").Value = rngFound.Offset(0, 2).Value



I want the Font Format to be AS IS from sheet1 to sheet2.

Some of the Fonts haver Font.Strikethrough, but when the data is copied
to
the other sheet using the above code, the fonts are always normal.

How can i adapt the code to do this?
Is it possible to do this by a line of code, rather than changing each
(rngFound.offset(*,*)) line ?


Corey....





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data sheet populating into multiple sheets Shaun New Users to Excel 5 February 28th 07 01:31 PM
Data Sheet populating to multiple sheets Shaun Excel Worksheet Functions 1 February 22nd 07 04:35 PM
Populating one sheet with data from other sheets Giselle[_2_] Excel Programming 1 March 25th 06 06:57 PM
populating sheet with data from other sheets G. Beard New Users to Excel 0 October 3rd 05 04:14 AM
Making different sheet from the original sheets data Shetty Excel Programming 5 October 27th 03 01:11 PM


All times are GMT +1. The time now is 07:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"