LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
AJ AJ is offline
external usenet poster
 
Posts: 99
Default I am trying to write a macro using If...Then

I am trying to write a macro that will look at the value in column G. If
that value is blank or zero, then select the entire row and delete it. Then I
want it to populate columns A with a number "111119" and column H with "TEXT"
Here's what I tried, but it's not working.

(There are other sorts, etc. that precede this item in the macro, that seem
to be working fine.)

If Range("g:g") < 1 = true
Then ActiveWorkbook.Worksheets("Tab3 Upload").Rows.Select
Selection.Delete
End If
If Range("b:b") 1 Then
Range("a:a").Select
Selection.Fill "111119"
Range("h:h").Select
Selection.Fill "TEXT"
End If
End Sub

 
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
How to write a macro JStiehl Excel Discussion (Misc queries) 4 August 11th 08 10:08 PM
how do i write a macro AB Excel Worksheet Functions 1 August 17th 06 08:47 PM
How to write a macro?? Keeter Excel Discussion (Misc queries) 1 July 19th 05 08:34 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
How do I write a macro for... Christopher Anderson Excel Discussion (Misc queries) 1 December 20th 04 05:18 PM


All times are GMT +1. The time now is 01:32 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"