Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bhupinder Rayat
 
Posts: n/a
Default Interrogating cells by cell formatting

Hi all

Is there anyway I can interrogate cells by what formatting they have?

For example, can I use an IF statement that tells excel to return the value
of a cell if it has a bold format, or otherwise return nothing?

I have a huge table of data that I have imported from word, that I need to
manipulate.

Any help would be much appreciated.


Regards,


Pinda.
  #2   Report Post  
Ian
 
Posts: n/a
Default

You can with a macro. eg

Sub CopyIfBold()
For r = 1 To 10
If Cells(r, 1).Font.Bold = True Then
Cells(r, 2).Value = Cells(r, 1)
End If
Next r
End Sub

This copies values in column 1 (A) rows 1 to 10 to the corresponding cell in
column 2 (B) if the font in A is bold.

--
Ian
--
"Bhupinder Rayat" wrote in
message ...
Hi all

Is there anyway I can interrogate cells by what formatting they have?

For example, can I use an IF statement that tells excel to return the
value
of a cell if it has a bold format, or otherwise return nothing?

I have a huge table of data that I have imported from word, that I need to
manipulate.

Any help would be much appreciated.


Regards,


Pinda.



  #3   Report Post  
Bhupinder Rayat
 
Posts: n/a
Default

Ian,

works like a dream. I can now edit the code to give me exactly what i want.
thank you for your help!


Pinda.

"Ian" wrote:

You can with a macro. eg

Sub CopyIfBold()
For r = 1 To 10
If Cells(r, 1).Font.Bold = True Then
Cells(r, 2).Value = Cells(r, 1)
End If
Next r
End Sub

This copies values in column 1 (A) rows 1 to 10 to the corresponding cell in
column 2 (B) if the font in A is bold.

--
Ian
--
"Bhupinder Rayat" wrote in
message ...
Hi all

Is there anyway I can interrogate cells by what formatting they have?

For example, can I use an IF statement that tells excel to return the
value
of a cell if it has a bold format, or otherwise return nothing?

I have a huge table of data that I have imported from word, that I need to
manipulate.

Any help would be much appreciated.


Regards,


Pinda.




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
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
cell formatting problems jazzsax505 New Users to Excel 2 May 29th 05 10:30 PM
Conditional formatting refering to another cells' value gizmo Excel Worksheet Functions 1 January 12th 05 01:06 PM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM


All times are GMT +1. The time now is 08:25 PM.

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

About Us

"It's about Microsoft Excel"