Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good morning...
How can I bypass empty cell to proceed to next row even if empty cells exist? For Example: col A B C row 1 red blue green 2 red 3 red blue I want to be able to populate to row as in this example. Code I wrote to go to next row: Nextrow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 2 Cells(Nextrow, 1) = txtfast.Text This works but validates empty cell as next row. thanks & have a happy day! girl on a mission! *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Myrna,
Your example isn't clear. Show examples of what you start with and what you want to end with. HTH, Bernie MS Excel MVP "Myrna Rodriguez" wrote in message ... Good morning... How can I bypass empty cell to proceed to next row even if empty cells exist? For Example: col A B C row 1 red blue green 2 red 3 red blue I want to be able to populate to row as in this example. Code I wrote to go to next row: Nextrow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 2 Cells(Nextrow, 1) = txtfast.Text This works but validates empty cell as next row. thanks & have a happy day! girl on a mission! *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In excel, I want to move to next row.
I noticed if cells are empty in the previous row, next row will setfocus on previous row empty cells. I designed a userform for data entry to excel worksheet. The textbox fields are being populated & proceeds to next rows. Although there may be a row consisting of empty fields. I need to bypass these empty fields. thanks again for your help. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Myrna,
No more words.... Simply show me what you are starting with, and what you want to end with: Start with your previous example: col A B C row 1 red blue green 2 red 3 red blue Copy and then edit this to show what you want to end with. HTH, Bernie MS Excel MVP "Myrna Rodriguez" wrote in message ... In excel, I want to move to next row. I noticed if cells are empty in the previous row, next row will setfocus on previous row empty cells. I designed a userform for data entry to excel worksheet. The textbox fields are being populated & proceeds to next rows. Although there may be a row consisting of empty fields. I need to bypass these empty fields. thanks again for your help. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Scenario:
col A B C row 1 red blue green 2 red 3 red blue 4 red blue green ****this is my desired result ROW 4 next empty row should be ROW 4, bypassing empty fields in ROWS 2 & 3 pardon for lack of clarity. is this clear? Thanks much Bernie for you immediate response. I'm sure this can be tackle, my mind is pondering... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Myrna,
If your data set starts in cell A1, then you can do something like Dim Nextrow As Long Dim myRange As Range Set myRange = Range("A1").CurrentRegion Nextrow = myRange(myRange.Cells.Count).Row +1 Cells(Nextrow, 1) = txtfast.Text Cells(Nextrow, 2) = .... Cells(Nextrow, 3) = .... HTH, Bernie MS Excel MVP "Myrna Rodriguez" wrote in message ... Scenario: col A B C row 1 red blue green 2 red 3 red blue 4 red blue green ****this is my desired result ROW 4 next empty row should be ROW 4, bypassing empty fields in ROWS 2 & 3 pardon for lack of clarity. is this clear? Thanks much Bernie for you immediate response. I'm sure this can be tackle, my mind is pondering... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Bernie, Thanks this code works successfully! It goes to next row & appends to previous fields if left empty. As my example below, the data is being inserted in B2 & C2. I need a way to skip over empty fields in a row & move forward. thanks for your patience & guidance! Set myRange = Range("A1").CurrentRegion Nextrow = myRange(myRange.Cells.Count).Row +1 Cells(Nextrow, 1) = txtfast.Text Cells(Nextrow, 2) = .... Cells(Nextrow, 3) = .... HTH, Bernie MS Excel MVP "Myrna Rodriguez" wrote in message ... Scenario: col A B C row 1 red blue green 2 red 3 red blue 4 red blue green ****this is my desired result ROW *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Myrna,
Does it work successfully? It seems you don't want it to insert data in B2 and C2, and if anything in row 3 is filled in, it shouldn't (and doesn't when I test.) After the line Nextrow = myRange(myRange.Cells.Count).Row +1 insert the code Msgbox "The row I will write to is row #" & nextrow then run it and see what it says. For your example data setup, it should say "The row I will write to is row #4" Otherwise, it really isn't working. HTH, Bernie MS Excel MVP "Myrna Rodriguez" wrote in message ... Hi Bernie, Thanks this code works successfully! It goes to next row & appends to previous fields if left empty. As my example below, the data is being inserted in B2 & C2. I need a way to skip over empty fields in a row & move forward. thanks for your patience & guidance! Set myRange = Range("A1").CurrentRegion Nextrow = myRange(myRange.Cells.Count).Row +1 Cells(Nextrow, 1) = txtfast.Text Cells(Nextrow, 2) = .... Cells(Nextrow, 3) = .... HTH, Bernie MS Excel MVP "Myrna Rodriguez" wrote in message ... Scenario: col A B C row 1 red blue green 2 red 3 red blue 4 red blue green ****this is my desired result ROW *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wow...
was in the process of responding! Bernie...mission accomplished, so exciting. The code works successfully. You been a delight in accomplishing my mission! Thanks for you patience as I was bugging you like vba code! enjoy life! myrna *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() enjoy life! I do! And you're quite welcome. Bernie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
in excel..:can't empty clip are" but already empty | Excel Discussion (Misc queries) | |||
Excel - Autom. Filter "Empty / Non Empty cells" should come first | Excel Discussion (Misc queries) | |||
How can I convert empty strings to empty cells? | Excel Discussion (Misc queries) | |||
Can blank cells created using empty Double-Quotes not be empty?? | Excel Programming |